MySQL select column length in php
Posted
by Patrick
on Stack Overflow
See other posts from Stack Overflow
or by Patrick
Published on 2010-06-12T12:45:33Z
Indexed on
2010/06/12
12:52 UTC
Read the original article
Hit count: 140
Hello!
How do i get the actual max length of a specified column in php?
For instance, this table:
id - int(11) name - string(20)
I want in php to select the maximum number of characters that a field can have, like SELECT length(name) from table1
and it should then return 20 (since its the maximum number of characters for that field).
© Stack Overflow or respective owner