Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [MySQL] Błąd w zapytaniu
Crozin
post 25.09.2006, 18:33:54
Post #1





Grupa: Zarejestrowani
Postów: 6 476
Pomógł: 1306
Dołączył: 6.08.2006
Skąd: Kraków

Ostrzeżenie: (0%)
-----


Mam zapytanie:
  1. CREATE TABLE `".$_SESSION['DataBase']['Prefix']."gallery` (
  2. `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  3. `title` varchar(255) NOT NULL,
  4. `description` text NOT NULL,
  5. `addtime` int(14) NOT NULL,
  6. KEY `id` (`id`)
  7. ) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=1 ;
  8.  
  9. CREATE TABLE `".$_SESSION['DataBase']['Prefix']."guestbook` (
  10. `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  11. `author` varchar(255) NOT NULL,
  12. `title` varchar(255) NOT NULL,
  13. `body` text NOT NULL,
  14. `addtime` int(14) NOT NULL,
  15. KEY `id` (`id`)
  16. ) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=1 ;
  17.  
  18. CREATE TABLE `".$_SESSION['DataBase']['Prefix']."help` (
  19. `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  20. `name` varchar(32) NOT NULL,
  21. `surname` varchar(64) NOT NULL,
  22. `help` text,
  23. `addtime` int(14) NOT NULL,
  24. KEY `id` (`id`)
  25. ) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=1 ;
  26.  
  27. CREATE TABLE `".$_SESSION['DataBase']['Prefix']."pages` (
  28. `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  29. `name` varchar(32) NOT NULL,
  30. `content` longtext NOT NULL,
  31. KEY `id` (`id`)
  32. ) ENGINE=MyISAM DEFAULT CHARSET=latin2 AUTO_INCREMENT=1 ;


w $_SESSION['DataBase']['Prefix'] jest przechowywany prefix (np.: cms_ )
zapytanie wywala mi error:

Cytat
Something is wrong in your syntax obok '; CREATE TABLE `cms_guestbook` ( `id` int(10) unsigned NOT' w linii 7


szukam - szukam tego bledu ale znalesc nie moge :/
jakies sugestie?

EDIT:
juz sobie poradzilem...

Ten post edytował Crozin 25.09.2006, 19:29:21
Go to the top of the page
+Quote Post
nospor
post 25.09.2006, 19:28:48
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




w php mozna wykonywac jedno zapytanie naraz, a u ciebie jest cztery w jednym


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 10:03