Select data from a database table.
select(string $table [, array $columns])
Arguments
$table: string
Define a database table name to select from.
$columns: array
An array of column names to select from the table. If $columns is not set, then it is assumed that every single column will be selected “*”.
Basic Usage
try{
// Selecting id, first & last name, and email from the
// users table.
$s = $squibble->select('users', [
'id',
'first_name',
'last_name',
'email_address'
]);
// collect() return an array of the result sets. This is the
// same as PDO $query->fetchAll(PDO::FETCH_ASSOC)
$users = $s->collect();
}catch(PDOException $e){
echo "Error, {$e->getCode()}, {$e->getMessage()}";
}catch(Exception $e){
echo "Error, {$e->getCode()}, {$e->getMessage()}";
}