PHP/MySQL Database/sqlite array query

Материал из Web эксперт
Перейти к: навигация, поиск

sqlite_array_query.php

 
<?php
   $sqldb = sqlite_open("mydatabase.db");
   $rows = sqlite_array_query($sqldb, "SELECT empid, name FROM employee");
   foreach ($rows AS $row) {
      echo $row["name"]." (Employee ID: ".$row["empid"].")<br />";
   }
   sqlite_close($sqldb);
?>