/ Published in: PHP
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<?php
if (!$bd = new SQLiteDatabase('database.sqlite', 0666, $error))
$sql = "SELECT * FROM table_name";
$data = $db->query($sql);
$data_count = $data->numRows();
if ($data_count != 0) {
for ($i=0; $i<$data_count; $i++) {
echo "$data->fieldName($i)";
}
while ($tuple = $data->fetch()) {
echo "$tuple['name']<br>";
echo "$tuple['description']<br>";
echo "$tuple['prize']<br>";
}
}
?>
Comments
 Subscribe to comments
                    Subscribe to comments
                
                