ユーザーと受信トレイの2つのテーブルがあります。
すべてのユーザーを取得し、別のテーブルでそれぞれからレコードを作成しようとしています。
これは私が試みていることですが、正しくありません:
$query = mysql_query("SELECT id FROM `users`"); //Get all the users
while (($row = mysql_fetch_assoc($query)) != false) {
$sql = "INSERT INTO inbox VALUES ('id goes here keeping empty','user id goes here','sender user id goes here','message title here','This is the message','date goes here')"; //Send message to them all
}
これどうやってするの?