Page 1 of 1

MySQL - Select only INT

Posted: Sun Dec 20, 2009 5:21 am
by oscardog
Hello,

I have a table with a field 'startletter' which is the first letter of the title which is also in the table. Anyway I can't work out how to select only fields that have an integer in them, i've googled etc but no luck.

Anyone know?

Thanks,

Oscardog

Re: MySQL - Select only INT

Posted: Sun Dec 20, 2009 8:14 pm
by daedalus__
what?

why do you need a whole column for the first letter and you are trying to select only integers from a char type column?

http://stackoverflow.com/questions/1611 ... sql-server

humm..

Re: MySQL - Select only INT

Posted: Sun Dec 20, 2009 11:49 pm
by nga
i have no idea what's your idea is for (probably mislead and illogical). But you can use is_numeric() on the field to check if it's numeric and do something only if it is (using if statement)