Max int value of char field? How to find...
| From: | Kraa de Simon | Date: | Mon, 22 Oct 2001 06:44:02 +0000 |
| Subject: | Max int value of char field? How to find... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-71797@lists.php.net to get a copy of this message | ||
Hello all,
How can I find the highest integer value in a result set like:
1
10
11
2
3
a
ab
abc
I'm looking for the value 11.
The statement 'select max(field) from table' gives me 'abc' so this won't
do.
Any ideas for a SQL statement that will do the trick?
I'm using PHP / MySQL.
Thanks!
Simon.