<?php
$link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
/* check connection */
if (!$link) {
printf("Connect failed: %s\n", maxdb_connect_error());
exit();
}
$query = "SELECT name, state FROM hotel.city ORDER BY name";
if ($result = maxdb_query($link, $query)) {
/* seek to row no. 400 */
maxdb_data_seek($result, 10);
/* fetch row */
$row = maxdb_fetch_row($result);
printf ("City: %s State: %s\n", $row[0], $row[1]);
/* free result set*/
maxdb_free_result($result);
}
/* close connection */
maxdb_close($link);
?>