Results 1 to 10 of 10
Thread: INSERT multiple records??
Nov 26, 2013, 14:01 #1
- Join Date
- Aug 2010
- 2 Post(s)
- 0 Thread(s)
INSERT multiple records??
Is there a fairly easy way to be able to INSERT a varying number of records using Prepared Statements?
Here is my current code which just inserts a single person into my table...
$q3 = "INSERT INTO private_msg_recipient(member_id_to, message_id, created_on)
VALUES (?, ?, NOW())";
$stmt3 = mysqli_prepare($dbc, $q3);
mysqli_stmt_bind_param($stmt3, 'ii', $pmRecipientID, $messageID);
I am trying to find a way that allows someone to INSERT as many records as needed (e.g. 1, 2, 10, 100, 10,000), but to do it all with just ONE QUERY because I hear that is much better than doing 1,000 INSERTs!!