include_once('config.inc.php');
@mysql_connect(db_default_host, db_default_user, db_default_password) OR die(mysql_error());
mysql_select_db(db_default_database) OR die(mysql_error());
$sql = "SELECT * FROM customers";
$result = mysql_query($sql);
if(empty($result)) {
echo "You have to provide a valid resource. Maybe your Query or DB Connection has errors.";
exit;
}
$dataObject = QDataObject::getInstance('mysql',$result);
$dataObject->byPage(($_GET["p"]?intval($_GET["p"]):1));
print "<pre>";
print_r($dataObject);
print "</pre>";
|