Lines Matching refs:table_alias

878 	 * @param string $table_alias
882 public static function makeSql($table_name, array &$options, $table_alias = null) { argument
904 $sql_parts = self::createSelectQueryParts($table_name, $options, $table_alias);
915 * @param string $table_alias
919 public static function select($table_name, array $options, $table_alias = null) { argument
922 $db_result = DBSelect(self::makeSql($table_name, $options, $table_alias), $options['limit']);
944 * @param string $table_alias
948 private static function tableId($table_name, $table_alias = null) { argument
949 return($table_alias !== null) ? $table_name.' '.$table_alias : $table_name;
956 * @param string $table_alias
960 private static function fieldId($field_name, $table_alias = null) { argument
961 return ($table_alias !== null) ? $table_alias.'.'.$field_name : $field_name;
969 * @param string $table_alias
973 private static function createSelectQueryParts($table_name, array $options, $table_alias = null) { argument
976 'from' => [self::tableId($table_name, $table_alias)],
982 $sql_parts = self::applyQueryOutputOptions($table_name, $options, $table_alias, $sql_parts);
985 $sql_parts = self::applyQueryFilterOptions($table_name, $options, $table_alias, $sql_parts);
988 $sql_parts = self::applyQuerySortOptions($table_name, $options, $table_alias, $sql_parts);
998 * @param string $table_alias
1003 private static function applyQueryOutputOptions($table_name, array $options, $table_alias = null, argument
1006 $sql_parts['select'][] = 'COUNT('.self::fieldId('*', $table_alias).') AS rowscount';
1011 $select[self::fieldId(self::getPk($table_name), $table_alias)] = true;
1020 $select[self::fieldId($field_name, $table_alias)] = true;
1034 * @param string $table_alias
1039 private static function applyQueryFilterOptions($table_name, array $options, $table_alias = null, argument
1052 $field_name = self::fieldId($pk, $table_alias);
1071 $sql_parts = self::dbFilter($table_name, $options, $table_alias, $sql_parts);
1082 * @param string $table_alias
1087 private static function dbFilter($table_name, $options, $table_alias = null, $sql_parts) { argument
1116 $filter[] = dbConditionId(self::fieldId($field_name, $table_alias), $value);
1121 $filter[] = dbConditionInt(self::fieldId($field_name, $table_alias), $value);
1125 $filter[] = dbConditionString(self::fieldId($field_name, $table_alias), $value);
1141 * @param string $table_alias
1146 …private static function applyQuerySortOptions($table_name, array $options, $table_alias = null, ar… argument
1161 $sql_parts['order'][] = self::fieldId($field_name, $table_alias).$sortorder;