Jump to content

using mysql_insert_id() to generate URLs with '?id= '


Recommended Posts

I'm trying to finalize a project that connects tables within a DB.

 

My given example has table of products and a table of product reviews. I've seen use of create php pages that reference an ID such as http://example.net/model.php?id=33 that links to http://example.net/reviewmodel.php?id=33 and http://example.net/deletemodel.php?id=33 where the ID in the URL (33 in my example) always references the same product in the different tables.

 

I am thinking that mysql_insert_id() is the tool used to keep these ID numbers in reference?

I've looked on google for some examples or tutorial on this type of php script/mysql but haven't had any luck.

 

Any ideas, hints, advice, comments are greatly appreciated and needed.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.