webref.eu Posted June 2, 2009 Share Posted June 2, 2009 Hi All I add products to my database, and allow auto increment to assign the ProductId as follows: Once the script has successfully added the product, I then immediately need the script to retrieve its ProductId, so what's the best way of doing that? Many thanks Quote Link to comment Share on other sites More sharing options...
jxrd Posted June 2, 2009 Share Posted June 2, 2009 If mysql: http://uk.php.net/mysql_insert_id Quote Link to comment Share on other sites More sharing options...
webref.eu Posted June 2, 2009 Author Share Posted June 2, 2009 That's great, thanks very much. Rgds Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.