ok to make it quick:
 it means that I simply should have id as a primary key and use unique for
the fields that makes the row unique!?

CREATE TABLE user(
          id INTEGER(10) NOT NULL AUTO_INCREMENT,
          firstName VARCHAR(32),
          lastName VARCHAR(32)
          PRIMARY KEY(id),
          UNIQUE(firstName,lastName)
)
(or something like that)

For the issue of the 2 people having the same names it just means that I
need more information such as address or email OR I should have a different
primary key (or no primary key at all) ????

Otherwise Is this way of creating table can be used for pretty much every
table ? (except like association table) ?

Anyway thanks for the answers, at least It can be done with Doctrine!
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Reply via email to