topical media & game development 
  
 
 
 
 
  
    
    
  
 professional-php-08-DB-connect.php / php
  <?php
  
  require_once('DB.php'); 
  conn = DB::connect(conn)) {
    //you would probably want to do something a bit more graceful here
    print("Unable to connect to the database using the DSN conn->getMessage());
  }
  
  //get all results as an associative array
  sql = "SELECT * FROM mytable";
  conn->getAll(data is not an error
  if (DB::isError(sql");
      die (data);
  
  
  
  
(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.