Forum Moderators: coopster
this is driving me mad now, basically i have a user table and a members table, when a member joins they set a password etc. Now i want the auto ID from user table to insert into members table when they create the account but it wont work....
$sql = "insert into user (foo) values
('$foo')";
printf("Last inserted record has id %d\n", mysql_insert_id());
This keeps giving me and ID of 0 but DB is auto incrementing?
Any ideas why i cant capture the insert ID..
TIA and Happy Xmas
Smad