<?php
// Once you have a valid DB object named $db...
$sth = $db->prepare('INSERT INTO numbers VALUES (?, ?, ?)');
if (PEAR::isError($sth)) {
die($sth->getMessage());
}
$alldata = array(array(1, 'one', 'en'),
array(2, 'two', 'to'),
array(3, 'three', 'tre'),
array(4, 'four', 'fire'));
$res =& $db->executeMultiple($sth, $alldata);
if (PEAR::isError($res)) {
die($res->getMessage());
}
?> |