PEAR::SQLite: The Lightweight Alternative - Queries
(Page 4 of 6 )
The query method is used to pass SQL queries to the database. Like MySQL, the queries can be used to create and delete tables and to insert, select and update data.
<?php $query = "INSERT INTO guestbook (fname, lname, email, comments) VALUES ('John', 'Smith', 'jsmith@example.org', 'This is a cool web site... Keep up the great work!')"; $result = $db->query(); ?>
The fetchRow method can be used to retrieve the results from a SELECT query. It's use is identical to that of PHP's mysql_fetch_row.