Preflight Projects Simple solutions to complex problems.

MySQL Field Types Cheatsheet for lazy bastards

You get all the fields in a query through using “mysqli_fetch_fields($yomamasrecordset); ” but now the result sticks you with NUMBERS where you would like to see WORDS indicating the TYPE of a field.  I want to know, is it INTEGER or VARCHAR… you know the story, I’m sure, if  you landed on this page and  you understand what you’re reading.

So, here’s an array setup in PHP for equating those effing NUMBERS to their type NAMES.  Nevermind that some of them are shared, no-one made laws about it.

Go expose yourself someplace

0 Replies to “MySQL Field Types Cheatsheet for lazy bastards”

Leave a Reply

Your email address will not be published. Required fields are marked *

Follow by Email