<?php
/**
You have to provide an existing connection
for getting a valid resource from mysql, otherwise
it will no work.
Attention: you have to switch to v.0.3
*/
include_once('config.inc.php');
$link = mysql_connect(db_default_host, db_default_user, db_default_password) OR die(mysql_error());
if (!$link) {
die('keine Verbindung möglich: ' . mysql_error());
}
mysql_select_db(db_default_database, $link) OR die(mysql_error());
$sql = "SELECT * FROM geodb_textdata"; // large db => 337925 records
$dataObject = QDataObject::getInstance('mysql',$link, $sql);
$dataObject->byPage(($_GET["p"]?intval($_GET["p"]):1));
print "<pre>";
print_r($dataObject);
print "</pre>";
|