Part II: Developing Intranet Solutions // Setup the (Web design service)

Part II: Developing Intranet Solutions // Setup the database URL $DB_URL = mysql://root:foobar@localhost/products ; // Create a DBI object that connects to the // database URL $dbi = new DBI($DB_URL); if (! $dbi->isConnected()) { echo Connection failed for $DB_URL
; exit; } // Create a SQL statement to fetch data $statement = SELECT ID, NAME FROM PROD_TBL ; // Execute the statement using DBI query method $result = $dbi->query($statement); // If the result of query is NULL then show // database error message if ($result == NULL) { echo Database error: . $dbi->getError() . n ; // Else check if there are no data available or not } else if (! $result->numRows()){ echo No rows found. ; // Now data is available so fetch and print data } else { echo

IDtNAME   ;   while ($row = $result->fetchRow()) {   echo $row->ID,    t   , $row->NAME,       ;  }  echo    

; } ?>
Note: If you are looking for high quality webhost to host and run your jsp application check Vision florida web design services

Leave a Reply