php - Multiple INSERT query's fetching last_insert_id of each each -


mysql_query( "insert users(email, password) values ('$email','$password')" ); $user_id = mysql_insert_id( );  mysql_query( "insert business_details ( business_id, name, address, city, state, country, pincode) values ('$category','$business_name', '$business_address', '$city', '$state', '$country', '$pincode')" ); $idb = mysql_insert_id( );  mysql_query( "insert user_profiles (name, phone, user_id, business_details_id) values ('$person_name', '$phone_number', '$user_id', '$idb')" ); 

what best way insert queries in one? possible?

no, isn't supported in mysql - oracle can it.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -