Page 1 of 1

Id question

Posted: Thu Feb 01, 2007 2:36 pm
by user___
I have two tables. One used for titles, lang, category, and id. The other has its own id and conten columns. Both ids are auto_increment so I wonder if a user enters a news and it is written in the tables, which are MyISAM, whether the ids will be the same as long as they are MyISAM and they do not support row locking.

Posted: Thu Feb 01, 2007 3:57 pm
by Christopher
If there is only ever one user entering data then the will probably stay the same. A better solution would be to add a field to the second table that contains the ID of the record in the first table. You can then join on first.id=second.first_id

Reply

Posted: Thu Feb 01, 2007 4:05 pm
by user___
I have an id in the second table so I should just remove the auto_increment and in the insert statement write what you have written. Am I right?