topical media & game development

talk show tell print

server-php-sqlite-demo-seek.php / php



  <?php
  
  db = new SQLiteDatabase("server-php-sqlite-demo.db");
  res = db->query("SELECT * FROM foo");
  n_rows = res->numRows(); // get number result rows
  res->seek(n_rows - 1); // move to the last row
  // retrieve data in reverse order
  do {
      data = res->current(SQLITE_ASSOC); // get row data
      print_r(data);
  }
  while (res->hasPrev()&& res->prev()); // until first row
  
  ?> 
  


(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.