<?
include_once('pdodb_class.php');
$DB = new PdoDB('DB0'); //Create a instance of PdoDB class with given ID
//ONLY FOR DEBUG
$DB->get_time = true; //Collect all connection and query time
$DB->debug = true; //Turn on debugging
//ONLY FOR DEBUG
$SQL = "SELECT * FROM some_table";
$DB->query($SQL); //Query a SQL
$DB->next_record(); //Fetch first record from database
/**
Show one record
*/
echo $DB->f('some_row_name'); //This function returns a given row name ex.ID,name,etc.
/**
LOOPS
*/
while($DB->Eof()){ //Use this functions for loops
echo $DB->f('some_row_name'); //This function returns a given row name ex.ID,name,etc.
$DB->next_record(); //FETCH NEXT RECORD
}
//ONLY FOR DEBUG
$DB->print_all_time();//Print all connections and query time
//ONLY FOR DEBUG
?>
|