Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: error przy tworzeniu tabeli
Forum PHP.pl > Forum > Bazy danych > MySQL
fuqs
Cytat
CREATE TABLE `szorty` (
`id` int(11) NOT NULL auto_increment,
`short` varchar(6) NOT NULL,
`url` varchar(1000) NOT NULL,
`st` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `short` (`short`)
) ENGINE=MyISAM DEFAULT;




Panowie, wywala mi blad ;/ co jest nie tak ?



#1064 - 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 '' at line 8
ayeo
  1. CREATE TABLE `szorty` (
  2. `id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
  3. `short` VARCHAR(6) NOT NULL,
  4. `url` TEXT NOT NULL,
  5. `st` DATETIME NOT NULL,
  6. KEY (`short`)
  7. )
  8. ENGINE = myisam;


Może tak?
fuqs
dzieki wielkie, dziala winksmiley.jpg
phpion
Cytat(fuqs @ 18.07.2009, 18:08:18 ) *
#1064 - 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 '' at line 8

Może polecę nieco offtopem ale uwielbiam te komunikaty błędów z MySQL smile.gif hehe. Pracując z PostgreSQL widzę jak powinny one wyglądać. Niestety MySQL raczy nas tylko takimi ogólnikami :/
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.