I am finishing off my shopping cart, I am just posting the order details into the orders table, which has an auto_increment id.

I need this ID so I can enter the products into the order_item table.

Some people have mentioned mysql_num_rows($query) but i am not sure on the syntax for implementing this.