<?php
$link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
maxdb_report (MAXDB_REPORT_OFF);
maxdb_query($link,"DROP TABLE friends");
maxdb_report (MAXDB_REPORT_ERROR);
maxdb_query($link, "CREATE TABLE friends (id int, name varchar(20))");
maxdb_query($link, "INSERT INTO friends VALUES (1,'Hartmut')");
maxdb_query($link, "INSERT INTO friends VALUES (2, 'Ulf')");
if (maxdb_field_count($link)) {
/* this was a select/show or describe query */
$result = maxdb_store_result($link);
/* process resultset */
$row = maxdb_fetch_row($result);
/* free resultset */
maxdb_free_result($result);
}
/* close connection */
maxdb_close($link);
?>