Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z baza, Nieakceptowany typ char(40)
kolumb
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 8.08.2006

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


Witam

Mam problem z moja baza danych. Nie moge ustawić typu kolumny char z 40 znakami. Typ jest automatycznie zmieniany na varchar(40) . Ogólnie char jest akceptowany tylko do 5 znaków. Nie wiecie czy to wina jakiegoś configu i jak to moge zmienić?

Mój serwer MySQL 3.23.58-max-debug

Pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





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




Problem odnosnie char i konwersji na varchar omawiany byl posredniu tu:
http://forum.php.pl/index.php?showtopic=48144&hl=varchar

Cytat
No niestety nie mogę znaleźć. Ale zrobilem eksperyment:
zalozylem tabele z jednym polem CHAR (20). No i git. Jest char
Dla pewnosci dodaje drugie pole CHAR. I jest git. Oba są CHAR.
Teraz dodaje kolejne pole, ale juz VARCHAR. No i automaycznie wszystkie pola CHAR zamieniają sie na VARCHAR. Proba ustawienia ich spowrotem na CHAR nic nie daje. Dopier gdy usune tamto VARCHAR, to moge spowrotem to zamienic na CHAR.
Nie sądze by byl to bug mojego klienta do mysql

edit:
znalazlem w manualu
http://dev.mysql.com/doc/refman/4.1/en/sil...mn-changes.html
CYTAT
If any column in a table has a variable length, the entire row becomes variable-length as a result. Therefore, if a table contains any variable-length columns (VARCHAR, TEXT, or BLOB), all CHAR columns longer than three characters are changed to VARCHAR columns
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: 27.12.2025 - 00:25