Method Mysql.SqlTable()->select1()
- Method
select1
arrayselect1(string|arrayselect_expr,string|arraywhere,void|stringtable_refs,void|string|arrayrest,void|stringselect_flags)- Description
Convenience variant of select for retrieving only a single column. The return value is an array containing the values in the
select_exprcolumn.- Parameter
select_expr The field to retrieve. It may name a column or a property, or it may be a select expression like "SHA1(x)". It may be given as an array to use bindings or
sprintf-style formatting - see handle_argspec for details.- Parameter
where The match condition, on the form of a WHERE expression. A WHERE clause will always be generated, but you can put e.g. "TRUE" in the match condition to select all records.
wheremay be given as an array to use bindings orsprintf-style formatting - see handle_argspec for details.- Parameter
table_refs Optional other tables to join into the SELECT. This is inserted between "FROM table" and "WHERE".
- Parameter
rest Optional clauses that follows after the WHERE clause, e.g. ORDER BY, GROUP BY, and LIMIT. It may be given as an array to use bindings or
sprintf-style formatting - see handle_argspec for details.- Parameter
select_flags Flags for the SELECT statement. If this string is given, it is simply inserted directly after the "SELECT" keyword.
- Returns
Returns an array with the values in the selected column. If a property is retrieved and some rows don't have the wanted property then UNDEFINED is put into those elements.
- See also