Jump to content

Insert into all


onthespot

Recommended Posts

I'd go about it this way...

 

$query = "SELECT `user_id` FROM `User`";
$result = mysql_query($query);

while($data = mysql_fetch_assoc($result))
{
mysql_query("INSERT INTO `Messages` VALUES('{$data['user_id']}', 'the message', 'other stuff')");
}

 

You will need to play with this, but it's generally right.

Link to comment
https://forums.phpfreaks.com/topic/172824-insert-into-all/#findComment-910908
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.