petermdenton
August 23rd, 2007, 01:04 PM
Hello,
I would like to take one post and insert it in 2 differet tables in mysql.
I thought this would work, but it either inserts the first one or the second one. Can anyone help?
$sql="INSERT INTO `da_polls` (`Title`, `Description`, `Usrid`, `Group_ID`, `Value_1`, `Value_2`, `Value_3`, `Value_4`, `Value_5`, `Time`)
VALUES ('$_POST[Title]','$_POST[Description]','$_POST[Usrid]','$_POST[Group_ID]','$_POST[Value_1]','$_POST[Value_2]','$_POST[Value_3]','$_POST[Value_4]','$_POST[Value_5]',NOW())";
$sql="INSERT INTO `da_conversations` (`Title`, `Description`, `Usrid`, `groupid`, `Time`)
VALUES ('$_POST[Title]','$_POST[Description]','$_POST[Usrid]','$_POST[Group_ID]',NOW())";
I would like to take one post and insert it in 2 differet tables in mysql.
I thought this would work, but it either inserts the first one or the second one. Can anyone help?
$sql="INSERT INTO `da_polls` (`Title`, `Description`, `Usrid`, `Group_ID`, `Value_1`, `Value_2`, `Value_3`, `Value_4`, `Value_5`, `Time`)
VALUES ('$_POST[Title]','$_POST[Description]','$_POST[Usrid]','$_POST[Group_ID]','$_POST[Value_1]','$_POST[Value_2]','$_POST[Value_3]','$_POST[Value_4]','$_POST[Value_5]',NOW())";
$sql="INSERT INTO `da_conversations` (`Title`, `Description`, `Usrid`, `groupid`, `Time`)
VALUES ('$_POST[Title]','$_POST[Description]','$_POST[Usrid]','$_POST[Group_ID]',NOW())";