<?php $link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
/* check connection */ if (maxdb_connect_errno()) { printf("Connect failed: %s\n", maxdb_connect_error()); exit(); }
/* Table City already exists, so we should get an error */ if (!maxdb_query($link, "CREATE TABLE hotel.city (ID INT, Name VARCHAR(30))")) { printf("Error - SQLSTATE %s.\n", maxdb_sqlstate($link)); }
maxdb_close($link); ?>
|