I have been trying for hours and hours to create a table in my postgre sql database but somehow the following error keeps appearing: Warning: PostgreSQL query failed: ERROR: parser: parse error at or near "(" in /export/home/www.huizenveiling.nl/htdocs/create.php on line 43
This is my code to create the tables:
<?
{
$connect = 'dbname=huizenveiling' ;
pg_connect($connect);
{
$sql = "CREATE TABLE kopen ( ID INT(8) unsigned NOT NULL auto_increment,
plaats TINYTEXT,
straatnaam TINTYTEXT,
huisnummer INT(8),
postcode TINTUTEXT,
prijs MEDIUMINT(6),
munt TINYTEXT,
type tinytext,
wijze tinytext NOT NULL,
bouwjaar smallint(6),
tuin tinytext,
oppervlakte smallint(6),
inhoud smallint(6),
kamers smallint(6),
ingangsdatum date,
einddatum date,
image1 tinytext,
image2 tinytext,
image3 tinytext,
image4 tinytext,
tekst text,
aanbieder tinytext,
email tinytext,
telefoon tinytext,
paswoord tinytext,
bieder longtext,
provincie mediumtext,
PRIMARY KEY (ID),
UNIQUE ID (ID)
) ;" ;
pg_exec($sql);
}
echo $query;
pg_exec("GRANT ALL ON kopen TO nobody");
}
?>