Jump to content

Recommended Posts

This is a stupid question, I know.  But I'm honestly not sure how this works:

 

I've got a table that has a secondary id field that will be used to link multiple records with different primary keys.  I would like the secondary id to auto_increment, but I also need to override it occasionally so I can set several records to the same secondary id (this is how they will be linked).  Make sense?

 

So, can I set the field to auto_increment when I set the table up, and then manually enter values later?

 

Nevermind.  I can't have more than one auto-increment field, and it must be a key.  My primary key already auto-increments, so I'll have to assign values in my PHP.

 

Thanks anyway!

 

--Josh

Link to comment
https://forums.phpfreaks.com/topic/53775-solved-auto_increment-question/
Share on other sites

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.