We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
That would still do 1 row with 2 columns. I would like to know if it is possible to use the same technique, but with a modified array and insert into multiple rows.
virmaior
narmi2 -> look more carefully.
the SQL would insert two rows.
Member_2_248744
hello narmi2, I can not see a way to have multiple inserts with a single statement like -
$stmt->execute(array(':column' => $unsafeValue, ':column' => $unsafeValue));
$stmt = $dbo->prepare('INSERT INTO games (addy) VALUES (:addy)');
$stmt->bindParam(':addy', $val,PDO::PARAM_STR);
$aAry = array($addy, $mail, $cal);
foreach($aAry as $val) $stmt->execute();
// will insert three rows with different values in each row
however to expand this to have more than one column added for each row would need more stuff,
as far as I can tell you will need some sort of for loop that does a separate $stmt->execute(); for each row inserted
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat