ze\row::query()ze\row::query($table, $cols, $ids, $orderBy = [], $indexBy = false, $ignoreMissingColumns = false, $limit = false, $storeResult = true)
Gets multiple rows from a given table in the database.
$tableThe name of a table to check.
You do not need to add the DB_PREFIX, this will be added automatically.
$colsThis can be either the name of a column, or an array of column names. This can be set to true to perform a SELECT * query, returning every column in the table. However, as per our coding practices, you should not do this unless you do need every row in the table.
$idsAn associative array of keys (column names) to values to search for; see Format of $id and $values for Database Functions for details. If multiple rows match, only the first one to be found will be returned.
$notZeroIf set to true, this function will insist that the value returned must not be zero. Defaults to false.
Only has any effect if you enter the name of a numeric column into $cols, and will be ignored if you enter an array of column names into $cols.
The result of a mysql_query() function call.
getRows('users', array('id, 'username'), array('first_name' => 'Bob'), 'last_name');
Gets the id and username of all users whose first name is "Bob", ordered by their last name.