Zdravím, mám chybu v príkaze SQL, ale neviem akú. Už som z toho zúfalý
Tu je úryvok z kódu:
Kód:
1 <?php
2 mysql_connect("localhost","root","---l");
3 $dotaz = "CREATE DATABASE IF NOT EXISTS forum";
4 mysql_query($dotaz) or die(mysql_error());
5 mysql_select_db("forum") or die(mysql_error());
6 $dotaz = "CREATE TABLE IF NOT EXISTS people(
7 people_id int(11) NOT NULL auto_increment,
8 people_meno varchar(255) NOT NULL,
9 people_heslo varchar(255) NOT NULL,
10 people_pravo int(2) NOT NULL default 1,
12 people_pocet_prispevkov int(5) NOT NULL default 0,
13 people_reg datetime NOT NULL default '0000-00-00 00:00:00',
14 PRIMARY_KEY (people_id) )";
15 mysql_query($dotaz) or die(mysql_error());
vypíše: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(people_id) )' at line 8
Pomôžte mi prosím