I have two tables in MySql database, one is sales_order and the other is sales_order_details which contains the details of the order in the s
sales_order
sales_order_details
s
http://ca.php.net/manual/en/mysqli.insert-id.php
is the property you are looking for. It is completely reliable.
mysql_insert_id (and all mysql_ functions) is deprecated.