I'm trying to use PEARs autoExecute function to insert into a table. But the function is just inserting the strings as empty string and ot the actual value in the array, also the date is being inserted as 0000-00-00, the only values correctly inserted are the sysadm and affiliate bit field values.
Can anyone help?
$table_name = 'user';
$fields_values = array(
'userid' => '1',
'email' => 'email@hotmail.com',
'surname' => 'Surname',
'forenae' => 'Forename',
'dob' => '1972-10-01',
'password' => 'password',
'sysadm' => 1,
'affiliate' => 0
);
$res = $db->autoExecute($table_name, $fields_values, DB_AUTOQUERY_INSERT);
if (PEAR::isError($res)) {
die($res->getUserInfo());
}