Jump to content
php.lv forumi

ievietot datus divās tabūlās vienlaicīgi


ziedinjsh

Recommended Posts

$register = mysql_query("INSERT INTO members (name, email, biografy, password, hash, date, ip) VALUES ('$name', '$email', '$biografy', '$password', '$hash', '$date', '$ip')");
$changestatuss = mysql_query("INSERT INTO akeys (status) VALUES ('1') WHERE hash='$hash'");

 

Šitā jau laikam nav pareizi, jo man iekš tabulas akeys nekas neieliekās, bet iekš tabulas members ieliekas viss!

 

kāds būtu risinājums??

 

Paldies jau iepriekš

Link to comment
Share on other sites

$variable1 = "INSERT INTO members (name, email, biografy, password, hash, date, ip) VALUES ('$name', '$email', '$biografy', '$password', '$hash', '$date', '$ip')";
mysql_query($variable1) or die(mysql_error());

$variable2 = "INSERT INTO akeys (status) VALUES ('1') WHERE hash='$hash'";
mysql_query($variable2) or die(mysql_error());

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...