On Thu, 28 Oct 2004 14:35, Chris Payne wrote:

> Hi there everyone,
> 
>  
> 
> I can?t seem to get the below to work with PHP and MySQL:
> 
>  
> 
> $sql = "SELECT MAX(FoodItemNumber) FROM menuitemsubs";
> 
>  
> 
> What am I doing wrong?  I need the highest number from the column
> FoodItemNumber, but it doesn?t return anything unless I change the MAX()
> to a * and I don?t want that I need it to be the MAX() number as it isn?t
> an auto-increment field.

Works a treat for me; au_linkid is a smallint which is not autoincrement, nd
not indexed at all.

mysql> select max(au_linkid) from categ_link;
+----------------+
| max(au_linkid) |
+----------------+
|            540 |
+----------------+
1 row in set (0.03 sec)

FoodItemNumber is an integer type?

-- 
David Robley

I Have To Stop Now, My Fingers Are Getting Hoarse!

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to