Queries

Once you have a Solar_Sql_Adapter object, you can start issuing queries directly and getting PDOStatement objects in return:

<?php
$sql = Solar::factory('Solar_Sql');
$pdoStatement = $sql->query('SELECT * FROM table_name');
?>

You can select rows using the fetch*() methods:

(You can also use the Solar_Sql_Select class to programmatically build SELECT statements piece-by-piece.)

Solar_Sql also comes with some convenience methods to aid in common data manipulation tasks: