Skip to content

Instantly share code, notes, and snippets.

@nobodyplace
Created May 31, 2011 05:50
Show Gist options
  • Save nobodyplace/1000032 to your computer and use it in GitHub Desktop.
Save nobodyplace/1000032 to your computer and use it in GitHub Desktop.
$sth = $pdo->prepare("INSERT INTO sample (id, date) VALUES (:id, :date)");
foreach($data as $line):
$sth->execute(array(
':id' => $line['id'],
':date' => $line['date']
));
endforeach;
$sth->closeCursor();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment