Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problem z tabela
arczi
post
Post #1





Grupa: Zarejestrowani
Postów: 66
Pomógł: 0
Dołączył: 17.10.2006
Skąd: Rzeszów

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


witam, moje umiejetnosci sql = calkowite poczatki...

Probuje stworzyc chyba najbardziej rozbudowana((IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) ) tabele sql w mojej karierze:
  1. CREATE TABLE nuke_filmy(
  2. film_id unsignedint NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  3. title char( 30 ) NOT NULL ,
  4. link char( 100 ) NOT NULL ,
  5. image char( 30 ) NOT NULL ,
  6. score unsignedfloat,
  7. rates unsignedint,
  8. sender char( 30 ) ,
  9. opis char( 50 ) ,
  10. data_dodania date NOT NULL
  11. );
  12.  
  13.  
  14. BŁĄD:
  15. #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 'unsignedint NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  16. title char(


probowalem sporo sposobow, ale nic z tego :/

prosze o pomoc (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 4)
dr_bonzo
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

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


A kolega zagladal do manuala?

Widziales kiedys takie typy danych?
Kod
unsignedfloat,
unsignedint,


brakuje spacji (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
a czegos takiego jak 'unsignedfloat' to w ogole nie ma -- jesli juz to 'float'
Go to the top of the page
+Quote Post
jarrod
post
Post #3





Grupa: Zarejestrowani
Postów: 312
Pomógł: 9
Dołączył: 14.10.2006
Skąd: warszawa

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


Cytat(arczi @ 2.11.2006, 22:18:47 ) *
near 'unsignedint NOT NULL AUTO_INCREMENT...


Przecież masz napisane...
  1. CREATE TABLE `nuke_filmy`(
  2. `film_id` int UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  3. `title` char( 30 ) NOT NULL ,
  4. `link` char( 100 ) NOT NULL ,
  5. `image` char( 30 ) NOT NULL ,
  6. `score` float UNSIGNED,
  7. `rates` int(11) UNSIGNED ,
  8. `sender` char( 30 ) ,
  9. `opis` char( 50 ) ,
  10. `data_dodania` date NOT NULL
  11. );


kolejność też ważna. nazwa -> typ danych -> opcje
Go to the top of the page
+Quote Post
dr_bonzo
post
Post #4





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

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


Cytat
kolejność też ważna. nazwa -> typ danych -> opcje

Eeee -- no chyba tak (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif) , moj blad -- po prostu dawno nie klepalem struktur tabeli recznie (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)


No ladnie, 'float unsigned' tez istnieje (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)
Go to the top of the page
+Quote Post
arczi
post
Post #5





Grupa: Zarejestrowani
Postów: 66
Pomógł: 0
Dołączył: 17.10.2006
Skąd: Rzeszów

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


dzieki jarrod
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 22.08.2025 - 22:39