Hi, I was wondering if the way I am inserting into multiple tables is
safe as far as when there are many simultaneous insertions at a given

Basically, there are two tables, first I insert into main table where
there's username and password (and first/last name, email) and then I
get the auto_number from that table for the record and insert that
auto_number along with more info into secondary table with more info
about the user.

$query4accounts="insert into accounts (username, password, fname, lname,
email) values ('$username', password('$password'), '$fname_eng',
'$lname_eng', '$email')";

$result=mysql_query($query4accounts) or die ("ERROR");

$getid=mysql_query("select * from accounts where username='$username'");


$query4gallery="insert into talkroom_gallery (userid, talkroom_active,
sex, about_eng, livenow_eng, photograph, emailnopublic, homepage, icq,
msn, aim, yahoo) values ('$userid', '$talkroom_active_variable', '$sex',
'$about_eng', '$livenow_eng', '$photograph', '$nopublic', '$homepage',
'$icq', '$msn', '$aim', '$yahoo')"; 

mysql_query($query4gallery) or die ("ERROR");

Thanks in advance for feedback and possible alternatives.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to