This is the query I am running on my database:
 
$query = "select orderid from receipts order by receipt_id DESC LIMIT
0,1";
 $orderid = mysql_query($query);
 
That should return the last record in the DB? Correct?
 
I currently get a number returned which is the number plus 1.
IE if 423 is the last DB record then 424 is returned.
 
Any ideas why this happens?
 
Also in the same table I have a shipping price variable.
My query for this is:
$query = "select shipping from receipts order by receipt_id DESC LIMIT
0,1";
 $shipping_cost = mysql_query($query);
 
Again this should return the last record?
It doesn't return anything however. Any ideas?

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com <http://www.violasystems.com/> 
[EMAIL PROTECTED]
Mobile +358 50 343 5159



 

Reply via email to