In case of UTF8 fields mysql_field_len() will return 3 times the maximum length (e.g. 30 for a VARCHAR(10) field)) for mysql_field_len() returns the byte length of the field not the defined size.
(PHP 4, PHP 5)
mysql_fetch_lengths — Pobiera długość każdego pola w wierszu wyniku
$wynik
) : array
Zwraca tablicę zawierającą długość każdego pola z wiersza
ostatnio pobranego przez mysql_fetch_row(),
lub FALSE
, jeżeli wystąpi błąd.
mysql_fetch_lengths() zapisuje w tablicy długości wszystkich pól z ostatniego wiersza pobranego przez funkcje mysql_fetch_row(), mysql_fetch_array() i mysql_fetch_object() zaczynając od ofsetu 0.
Patrz także: mysql_fetch_row().
In case of UTF8 fields mysql_field_len() will return 3 times the maximum length (e.g. 30 for a VARCHAR(10) field)) for mysql_field_len() returns the byte length of the field not the defined size.