Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MYSQL]Problem z zapytaniem SQL, nvalid default value for 'id'
joCkero
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 20.07.2007

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


Witam,

Otoz po zapytaniu SQL
  1. CREATE TABLE shoutbox (
  2. id int(11) DEFAULT '0' NOT NULL AUTO_INCREMENT,
  3. tresc text,
  4. imie text,
  5. ip text,
  6. UNIQUE id (id),
  7. PRIMARY KEY (id)
  8. );

MySQL zwrócił komunikat:
#1067 - Invalid default value for 'id'

Znalazlem na jednym z forow ten sam problem, wtedy ktos poradzil aby wyslac takie zapytanie
  1. CREATE TABLE `shoutbox` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `tresc` text NOT NULL DEFAULT '',
  4. `imie` text NOT NULL DEFAULT '',
  5. `ip` text NOT NULL DEFAULT '',
  6. PRIMARY KEY (`id`)
  7. ) AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;


Fakt, wchodiz, bez problemu, ale na stronie wyswietla sie komunikat Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in

Co zrobic?
Go to the top of the page
+Quote Post

Posty w temacie


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: 26.09.2025 - 17:04