♥yesudo Posted March 5, 2004 Share Posted March 5, 2004 $get_last_order_id = tep_db_query("select orders_id from " . TABLE_ORDERS . " o, order by o.orders_id desc, limit 1"); thanx, Your online success is Paramount. Link to comment Share on other sites More sharing options...
fishy Posted March 5, 2004 Share Posted March 5, 2004 replace the , with a . in o, order by Link to comment Share on other sites More sharing options...
♥yesudo Posted March 5, 2004 Author Share Posted March 5, 2004 thanks mrb. still gettin: 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 Your online success is Paramount. Link to comment Share on other sites More sharing options...
♥yesudo Posted March 5, 2004 Author Share Posted March 5, 2004 answer: $get_last_order_id = tep_db_query("select orders_id from " . TABLE_ORDERS . " o order by o.orders_id desc limit 1"); Your online success is Paramount. Link to comment Share on other sites More sharing options...
Guest Posted March 6, 2004 Share Posted March 6, 2004 You don't need the reference 'o' when only querying one table :P Matti Link to comment Share on other sites More sharing options...
♥yesudo Posted March 6, 2004 Author Share Posted March 6, 2004 Thanks Matti - will keep that in mind for the future. Your online success is Paramount. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.