MySQL select column length in php
- by Patrick
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).