SQLite3 Class Example

$db = new SQLite3("path_to_db");
$cnt = $db->query("select count(column_name) as cnt from table_name");
$cnt = $cnt->fetchArray(SQLITE3_NUM);
$result = $db->query("select column1, column2, column3 from table_name");
if($cnt[0] > 0){
        while($row = $result->fetchArray(SQLITE3_ASSOC)){
                print($row['column1'] . ' and ' . $row['column2'] . ' and ' . $row['column3'] . '\n');
        }
}

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.