# 2 mysql INSERT statements at same time?

**URL:** <https://forum.kirupa.com/t/2-mysql-insert-statements-at-same-time/236785>\
**Category:** programming\
**Created:** [August 23, 2007, 5:04pm UTC](https://forum.kirupa.com/t/2-mysql-insert-statements-at-same-time/236785 "2007-08-23T17:04:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![petermdenton](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@petermdenton](https://forum.kirupa.com/u/petermdenton)\
**Post date:** [August 23, 2007, 5:04pm UTC](https://forum.kirupa.com/t/2-mysql-insert-statements-at-same-time/236785/1 "2007-08-23T17:04:09Z")

</div>

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())”;
