Search the Community
Showing results for tags 'primary key'.
I am constructing a table where it holds a many to many relationship with other 2 tables. This many-to-many table has 2 columns, both of which are foreign keys to 2 other tables. The many-to-many table is called favorites(it is self-explanatory what it does) and the parent tables are called business users and credentials.Here is an image: https://skydrive.live.com/redir?resid=BE27434B2AAC8130!259&authkey=!ADptTU72dh1KYBc&v=3 As I understand, and tell me if I am wrong, none of these 2 columns must be primary key. The reason being that a primary key must be unique in every ro
I am working on a blog for a friend's website. Upon testing the database which holds her blog posts (for security issues and whatnot), and dropping random rows from it, I have noticed that the id field does not re-organize itself. The way I will be displaying her posts (5 per page, with previous and next buttons) depends on the id being in order and with no gaps. Is there any way I can put in a script using PHP or MySQL to organize these in case of a row being removed once the blog goes live? Also, I have noticed that I can put in one entry, drop it, and then when I test another one the id sta