Is there a way to use PHP + PDO to query a MySQL database and find out the column widths of some VARCHAR fields? I do not want to hardcode them into my PHP file, if possible.
(goal: determine the maximum row lengths that you need to either insert into these columns or compare with existing data in the columns.)
source
share