Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Sql error
prest
post
Post #1





Grupa: Zarejestrowani
Postów: 91
Pomógł: 0
Dołączył: 25.12.2003

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


Hej

Ktos moze ma pojecie gdzie jest problem

  1. SQL query:
  2.  
  3. CREATE TABLE calendar(
  4. cal_id int NOT NULL AUTO_INCREMENT ,
  5. owner_id int,
  6. titlechar( 80 ) ,
  7. notechar( 120 ) ,
  8. date date,
  9. starttimechar( 5 ) ,
  10. stoptimechar( 5 ) ,
  11. repeat enum( 'Y', 'N' ) DEFAULT 'N',
  12. interv int,
  13. repeattype enum( 'DAY', 'WEEK', 'MONTH', 'YEAR' ) ,
  14. until date,
  15. lastupdate date,
  16. updateby int,
  17. calread enum( 'Y', 'N' ) DEFAULT 'N',
  18. calwrite enum( 'Y', 'N' ) DEFAULT 'N',
  19. calupdate enum( 'Y', 'N' ) DEFAULT 'N',
  20. caldelete enum( 'Y', 'N' ) DEFAULT 'N',
  21. PRIMARY KEY ( cal_id )
  22. )
  23.  
  24. MySQL said: Documentation
  25. #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 'repeat enum('Y','N') DEFAULT 'N',
  26. interv int,
  27. repeattype enum('DAY','WEEK','M' at line 9
Go to the top of the page
+Quote Post
sf
post
Post #2





Grupa: Zarejestrowani
Postów: 1 597
Pomógł: 30
Dołączył: 19.02.2003
Skąd: Tychy

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


czy repeat nie jest słowem kluczowym? wtedy daj je tak `repeat`


--------------------
Zapraszam na mój php blog, tworzenie stron.
Go to the top of the page
+Quote Post
prest
post
Post #3





Grupa: Zarejestrowani
Postów: 91
Pomógł: 0
Dołączył: 25.12.2003

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


Cytat(sf @ 4.05.2007, 17:19:03 ) *
czy repeat nie jest słowem kluczowym? wtedy daj je tak `repeat`


Oczywiscie ze jest ale ja wolalbym aby ktos podal rozwiazanie:)
Go to the top of the page
+Quote Post
sf
post
Post #4





Grupa: Zarejestrowani
Postów: 1 597
Pomógł: 30
Dołączył: 19.02.2003
Skąd: Tychy

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


a nie podałem? snitch.gif


--------------------
Zapraszam na mój php blog, tworzenie stron.
Go to the top of the page
+Quote Post
prest
post
Post #5





Grupa: Zarejestrowani
Postów: 91
Pomógł: 0
Dołączył: 25.12.2003

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


Cytat(sf @ 4.05.2007, 17:45:05 ) *
a nie podałem? snitch.gif



nie jestem na tyle obeznany z sql smile.gif niestety potzrebuje syntax sorki
Go to the top of the page
+Quote Post
Daimos
post
Post #6





Grupa: Zarejestrowani
Postów: 1 319
Pomógł: 118
Dołączył: 26.11.2003
Skąd: Lublin

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


Cytat(sf @ 4.05.2007, 17:19:03 ) *
czy repeat nie jest słowem kluczowym? wtedy daj je tak `repeat`

nie rozumiesz co tam wyzej kolega sf napisal?
slowo repeat umiesc w tych ciapkach `````````
dlatego ze repeat jest zarezerwowanym slowem

Ten post edytował my salsa 4.05.2007, 17:00:46


--------------------
scriptun.com. Startup z poradnikami do gier ttp.zone i ttpzone.pl
Go to the top of the page
+Quote Post
prest
post
Post #7





Grupa: Zarejestrowani
Postów: 91
Pomógł: 0
Dołączył: 25.12.2003

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


Cytat(my salsa @ 4.05.2007, 17:59:36 ) *
nie rozumiesz co tam wyzej kolega sf napisal?
slowo repeat umiesc w tych ciapkach `````````
dlatego ze repeat jest zarezerwowanym slowem



ciagle ten sam error
Go to the top of the page
+Quote Post
nospor
post
Post #8





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




  1. CREATE TABLE `calendar` (
  2. `cal_id` int(11) NOT NULL AUTO_INCREMENT,
  3. `owner_id` int(11) DEFAULT NULL,
  4. `title` char(80) DEFAULT NULL,
  5. `note` char(120) DEFAULT NULL,
  6. `date` date DEFAULT NULL,
  7. `starttime` char(5) DEFAULT NULL,
  8. `stoptime` char(5) DEFAULT NULL,
  9. `repeat` enum('Y','N') DEFAULT 'N',
  10. `interv` int(11) DEFAULT NULL,
  11. `repeattype` enum('DAY','WEEK','MONTH','YEAR') DEFAULT NULL,
  12. `until` date DEFAULT NULL,
  13. `lastupdate` date DEFAULT NULL,
  14. `updateby` int(11) DEFAULT NULL,
  15. `calread` enum('Y','N') DEFAULT 'N',
  16. `calwrite` enum('Y','N') DEFAULT 'N',
  17. `calupdate` enum('Y','N') DEFAULT 'N',
  18. `caldelete` enum('Y','N') DEFAULT 'N',
  19. PRIMARY KEY (`cal_id`)
  20. )


miales polaczone slowa kluczowe char z innymi slowami


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

"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
prest
post
Post #9





Grupa: Zarejestrowani
Postów: 91
Pomógł: 0
Dołączył: 25.12.2003

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


Cytat(nospor @ 4.05.2007, 18:08:59 ) *
  1. CREATE TABLE `calendar` (
  2. `cal_id` int(11) NOT NULL AUTO_INCREMENT,
  3. `owner_id` int(11) DEFAULT NULL,
  4. `title` char(80) DEFAULT NULL,
  5. `note` char(120) DEFAULT NULL,
  6. `date` date DEFAULT NULL,
  7. `starttime` char(5) DEFAULT NULL,
  8. `stoptime` char(5) DEFAULT NULL,
  9. `repeat` enum('Y','N') DEFAULT 'N',
  10. `interv` int(11) DEFAULT NULL,
  11. `repeattype` enum('DAY','WEEK','MONTH','YEAR') DEFAULT NULL,
  12. `until` date DEFAULT NULL,
  13. `lastupdate` date DEFAULT NULL,
  14. `updateby` int(11) DEFAULT NULL,
  15. `calread` enum('Y','N') DEFAULT 'N',
  16. `calwrite` enum('Y','N') DEFAULT 'N',
  17. `calupdate` enum('Y','N') DEFAULT 'N',
  18. `caldelete` enum('Y','N') DEFAULT 'N',
  19. PRIMARY KEY (`cal_id`)
  20. )


miales polaczone slowa kluczowe char z innymi slowami



MySQL said: Documentation
#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 'repeat enum( 'Y', 'N' ) DEFAULT 'N',interv int,repeattype enum( 'DAY', 'WEEK', '' at line 1

Ten post edytował prest 4.05.2007, 17:27:10
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 Aktualny czas: 19.08.2025 - 13:17