<?php
/***********/
/*TEST FILE*/
/***********/
// import class:
require_once("QMySql-class.php");
// Setting UP config class: Host,User,Pass,Database
$Sql = new ClassMySql("HOST","USER","PASS","DATABASE");
// connect to DB:
$Sql->Connect();
// Query DB:
$query = $Sql->Query("SELECT * FROM table");
// Use result how a normal query usage:
$row = mysql_fetch_array($query);
// print a field:
print $row['field'];
// print query count:
print "Query count:" . $Sql->traceQuery() . "<br>\n";
// print errors:
print $Sql->Error();
// close DB:
$Sql->Close();
?>
|