Method: db::select

Returns multiple rows from a table

Info

Syntax

db::select($table, $select='*', $where=null, $order=null, $page=null, $limit=null, $fetch=true)

Parameters

Return (mixed)

Example


$users = db::select('users', '*');
// users is an array with all rows and all columns from the table 'users'


$posts = db::select('posts', 'id, title, body', array('user' => 1));
// posts is an array with all posts from user 1 and the specified columns


$comments = db::select('comments', array('id', 'text'), false, 'added DESC', 0,10);
// comments is an array with 10 comments sorted by comments_added