query MySQL for latest record

wxdqz

New Member
How can I get the most recent/last record from my table ?

My table "OrdNum" has two fields: Day, OrderNumber
OrderNumber is set to "default 0, autoincrement"

When a new order is produced, an entry is made into the table:
mysql_query("insert into OrdNum (Day,OrderNumber) values ('$mday','')");
How do I get the new/incremented OrderNumber "$OrderNumber"!


Thanks
 
Back
Top