fetchRow() method to retrieve a single Row. It can be called
either by primary key, or with a
// fetch by primary key thread_id = 1 $threadRow = $threadTable->fetchRow('1'); $threadRow = $threadTable ->select() ->where('thread_id = ', '1') ->fetchRow();
fetchRow()does not find a match, it will return
fetchRows() method works the same as
fetchRow(), but returns an
array of Rows. It can be called either with primary keys, or with a
// fetch thread_id 1, 2, and 3 $threadRows = $threadTable->fetchRows([1, 2, 3]); // This is identical to the example above, but uses the `select()` variation. $threadRows = $threadTable ->select() ->where('thread_id IN ', [1, 2, 3]) ->fetchRows();
fetchRows()does not find a match, it will return an empty array.
Table::select() method returns a query object that you access to all the
underlying SQL query methods. See the query system
documentation for more information.
select() method will automatically quote the table name in the FROM
In addition, the
fetchRows() methods will automatically quote
the primary key column names in the WHERE clause.
You can manually quote any other identifiers using the Select object's