本文整理汇总了PHP中SQL::ToTblNm方法的典型用法代码示例。如果您正苦于以下问题:PHP SQL::ToTblNm方法的具体用法?PHP SQL::ToTblNm怎么用?PHP SQL::ToTblNm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SQL
的用法示例。
在下文中一共展示了SQL::ToTblNm方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SetSelectValues
public function SetSelectValues()
{
if ($this->TryToApplyUsualScheme()) {
return;
}
$this->CheckSearch();
$fields = array();
switch ($this->samplingScheme) {
case static::REGISTRATION_CHECK_SCHEME:
$fields = SQL::PrepareFieldsForSelect(static::TABLE, [$this->idField, $this->GetFieldByName(static::LOGIN_FLD)]);
break;
case static::LOGIN_SCHEME:
$fields = SQL::PrepareFieldsForSelect(static::TABLE, array($this->idField, $this->GetFieldByName(static::PASS_FLD), $this->GetFieldByName(static::SALT_FLD)));
break;
case static::PROFILE_INFO_SCHEME:
$fields = SQL::PrepareFieldsForSelect(static::TABLE, [$this->idField, $this->GetFieldByName(static::NAME_FLD), $this->GetFieldByName(static::SURNAME_FLD), $this->GetFieldByName(static::PHONE_FLD), $this->GetFieldByName(static::ROOM_FLD), $this->GetFieldByName(static::DESCRIPTION_FLD), $this->GetFieldByName(static::REGISTER_DATE_FLD), $this->GetFieldByName(static::LAST_UPDATE_FLD), $this->GetFieldByName(static::PROFILE_VIEWS_FLD)]);
$fields[] = ImageWithFlagSelectSQL(static::TABLE, $this->GetFieldByName(static::PHOTO_FLD));
$fields[] = sprintf("(SELECT get_user_ad_amount_by_id(%s)) as ad_amount", $this->accSelf ? SQL::ToTblNm(Session::TABLE, Session::USER_FLD) : SQL::ToTblNm(static::TABLE, static::ID_FLD));
break;
case static::EXTRA_DATA_SCHEME:
$fields = SQL::PrepareFieldsForSelect(static::TABLE, [$this->GetFieldByName(static::DESCRIPTION_FLD)]);
break;
case static::CONTACT_INFO_SCHEME:
$fields = SQL::PrepareFieldsForSelect(static::TABLE, [$this->GetFieldByName(static::ROOM_FLD), $this->GetFieldByName(static::PHONE_FLD)]);
break;
case static::NAME_INFO_SCHEME:
$fields = SQL::PrepareFieldsForSelect(static::TABLE, [$this->GetFieldByName(static::NAME_FLD), $this->GetFieldByName(static::SURNAME_FLD)]);
break;
}
$this->selectFields = SQL::GetListFieldsForSelect($fields);
}
示例2: ToTblNm
public function ToTblNm($name)
{
return SQL::ToTblNm(static::TABLE, $name);
}
示例3: GetSQL
public function GetSQL()
{
return SQL::ToTblNm($this->table, $this->field->GetName());
}
示例4: GetOrder
public function GetOrder()
{
$result = '';
$amount = count($this->fields);
foreach ($this->fields as $key => $field) {
$result .= (!empty($field['info']) ? SQL::ToTblNm($field['info']->table, $field['info']->GetFieldName()) : '') . ' ' . $field['type'] . ($key < $amount - 1 ? ', ' : '');
}
return $result;
}