PEAR executeMultiple() returned Unknown Error
Posted: Fri Sep 23, 2005 6:02 am
Hello there!
The code below returned an unknown error
The code below returned an unknown error
What could be wrong? Help appreciated.DB Error: unknown error
Code: Select all
/* print_r ($data); would return
Array
(
[0] => Array
(
[cserial] => 123456789015
[ccolor] => orange
[ctaste] => good
)
[1] => Array
(
[cserial] => 123456789014
[ccolor] => orange
[ctaste] => bad
)
[2] => Array
(
[cserial] => 123456789013
[ccolor] => white
[ctaste] => good
)
)
*/
function add_cookies($data, $type) {
// DB conn here
$query = $db->prepare( "INSERT INTO cookies (
cookie_type, cookie_serial, cookie_color,
cookie_taste
) VALUES (
'$type', ?, ?, ?)");
$result = $db->executeMultiple($query, $data);
}
add_cookies("danone", $data);