topical media & game development

talk show tell print

server-php-sqlite-demo-like.php / php



  <?php
  
  db = sqlite_open("server-php-sqlite-demo.db");
  // Retrieve the id of column (as string)
  id = sqlite_single_query(db, "SELECT id FROM foo WHERE name='Ilia'");
  var_dump(id); //string(1)
  
  // In the event >1 row matches, the result is an array
  ids = sqlite_single_query(db, "SELECT id FROM foo WHERE name LIKE 'I%'");
  var_dump(ids); // array(3)
  
  ?> 
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.