[thelist] Where to Store Username and Password in SQL Tables
rudy
r937 at interlog.com
Tue Jan 28 11:21:31 CST 2003
> How do I go about adding all of this at the same time? No PK exists
> until I execute the query to add the data to the Manufacturers table.
true
you need two insert statements
> What I'm not grasping is how I pull the PK from the Manufacturer's table
> when I create the User.
aye, that's the challenge
> Does this make sense?
well, i don't do php, but i'll give it a shot
> if(data is ok && no duplicate information){
no, let the database check for duplicates during the insert
> $last=last_insert_id(manufacturers);
yes, that function or mysql_insert_id -- check the manual for the one you'd
rather use
there's another way to do it, but those functions are fine
rudy
More information about the thelist
mailing list