Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> mysql blad
rise22
post
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 29.11.2005

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


sorry ze zaczynam nowy temat .ktos wie moze jak poprawic ten problem??
Cytat
SQL=Invalid default value for 'rating_sum':


  1. # Table structure for table `mos_content_rating`
  2.  
  3. CREATE TABLE `mos_content_rating` (
  4. `content_id` int(11) NOT NULL DEFAULT '0',
  5. `rating_sum` int(11) UNSIGNED NOT NULL DEFAULT '',
  6. `rating_count` int(11) UNSIGNED NOT NULL DEFAULT '0',
  7. `lastip` varchar(50) NOT NULL DEFAULT '',
  8. PRIMARY KEY (`content_id`)
  9. ) TYPE=MyISAM


Prosze używać bbcode.
poprawiam. PRawda że lepiej wygląda? smile.gif
---
nospor



jaka powinna byc wartosc dla 'rating_sum':questionmark.gif
Go to the top of the page
+Quote Post
escaflowne
post
Post #2





Grupa: Zarejestrowani
Postów: 220
Pomógł: 0
Dołączył: 20.02.2003
Skąd: Poznań

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


Before:
  1. # Table structure for table `mos_content_rating`
  2.  
  3. CREATE TABLE `mos_content_rating` (
  4. `content_id` int(11) NOT NULL DEFAULT '0',
  5. `rating_sum` int(11) UNSIGNED NOT NULL DEFAULT '',
  6. `rating_count` int(11) UNSIGNED NOT NULL DEFAULT '0',
  7. `lastip` varchar(50) NOT NULL DEFAULT '',
  8. PRIMARY KEY (`content_id`)
  9. ) TYPE=MyISAM


After:
  1. # Table structure for table `mos_content_rating`
  2.  
  3. CREATE TABLE `mos_content_rating` (
  4. `content_id` int(11) NOT NULL DEFAULT '0',
  5. `rating_sum` int(11) UNSIGNED NOT NULL,
  6. `rating_count` int(11) UNSIGNED NOT NULL DEFAULT '0',
  7. `lastip` varchar(50) NOT NULL DEFAULT '',
  8. PRIMARY KEY (`content_id`)
  9. ) TYPE=MyISAM


Spróbuj i napisz, czy teraz wywala jakiś błąd.

Która wersja MySQL'a?

Ten post edytował escaflowne 30.11.2005, 10:26:15


--------------------
Wieczność jest bardzo nudna, szczególnie pod koniec - Woody Allen
/home/env: Apache 2.2 | PHP 5.2 | MySQL 5.1 | FreeBSD 8.0 | NetBeans 6.8 | symfony 1.4
Go to the top of the page
+Quote Post
mhs
post
Post #3





Grupa: Zarejestrowani
Postów: 764
Pomógł: 3
Dołączył: 30.04.2003

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


A mi to zapytanie tworzace tabele wykonalo sie prawidlowo, przy czym dostalem 1 warning.

Skoro w rating_sum nie chcesz miec wartosci NULL, a typ pola masz int to chyba pozostaje Ci wartosc 0.

-edit-
warning, ktory mi sie wygenerowal komunikat nie zwiazany z wartoscia default tylko z TYPE

Cytat
'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead


Ten post edytował mhs 30.11.2005, 10:28:59
Go to the top of the page
+Quote Post
rise22
post
Post #4





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 29.11.2005

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


dziala dzieki exclamation.gif!
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: 20.08.2025 - 18:17