Hello!
I've got two tables. Let's say its called Person(person_id, name, address) and Sports(sports_id, person_id). The person_id is auto_increment in the Person table, but not in the Sports table. My problem is that I want the the person_id to be the same in the two tables. The problem is that I do not know what it will be in the Person table, since it is auto_increment.
$result = mysql_query("INSERT INTO Person values(0000, 'John', 'Whatever')",$db);
Now I need the person_id to put it into the Sports table.
$result = mysql_query("INSERT INTO Sports values(0000, person_id)",$db);
How can one solve this problem?
T.