Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL] Dziwny błąd przy tworzeniu bazy
Max Damage
post
Post #1





Grupa: Zarejestrowani
Postów: 246
Pomógł: 19
Dołączył: 14.06.2007

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


Tak wyglada baza:

  1. <?php
  2. mysql_connect('localhost','user','haslo');
  3. mysql_select_db("nazwa_bazy");
  4.  
  5. $sql="create table forum
  6. nick varchar(16) unsigned not null auto_increment,
  7. haslo char(40) not null,
  8. email varchar(100) not null,
  9. id_artykulu int unsigned not null auto_increment primary key,
  10. temat char(20) not null,
  11. wiadomosc text,
  12. umieszczony datetime not null)";
  13.  
  14. ?>

A taki wyskakuje błąd na stronie:
  1. 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 'unsigned not null auto_increment, haslo char(40) not null, email varchar(100) ' at line 3


--------------------
"Wszyscy wiedzą, że czegoś nie da się zrobić, i przychodzi taki jeden, który nie wie, że się nie da, i on właśnie to robi." - Albert Einstein
Go to the top of the page
+Quote Post

Posty w temacie


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: 21.08.2025 - 16:14