Jump to content

[SOLVED] auto_increment question


infinivert

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.