Jump to content

Recommended Posts

Hi, I've only been working with PHP and MySQL for about the last month and half and have done fairly well but have run into a problem that I hope has an answer.

 

I'm working on a simple, small animation showcase site where people I know (animators) can post their animations/movies. Visitors can then "tag" their movies with descriptive words.

 

If I submit a form to insert the mysql row that has an auto-incrementing ID # on it into a table, is there a way to retrieve that ID immediately and use it in that same query to insert the ID # into another table (which I use to cross-reference the table that contains all of my movies's info and the table that contains the information I want to be able to relate to that user)?

 

SO, more plainly I want to:

- Retrieve from a form/page the movieID and tag

- Insert "tag" into "tags" table of my database, which automatically assigns each tag row an ID

- Pull the tagID for the tag row that was just created from the tags table <- Where I need the help

- Insert the tagID and movieID into a crossref table

 

Any help would be great. :D

 

 

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.