I would like to know the answer too. Anyone here know what is the answer. I'll do some investigation and get back to you if I bump into an decent answer. You should email the people at iPage as they probably can help you..
Check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by o.orders_id desc, limit 1' at line 1..
$get_last_order_id = tep_db_query("select orders_id from "TABLE_ORDERS" o order by o.orders_id desc limit 1");..
You don't need the reference 'o' when only querying one table.
Thanks Matti - will keep that in mind for the future...
$get_last_order_id = tep_db_query("select orders_id from "TABLE_ORDERS" o, order by o.orders_id desc, limit 1");.
O, order by..