Hi!
I'm using the pear db package. I encountered the following error:
Call to undefined function: autoprepare()
during execution of this code:
<?php
require_once 'DB.php';
$dsn = "mysql://test:nopass@localhost/infodb";
$db = DB::connect($dsn);
if (DB::isError($db)) {
die ($db->getMessage());
}
$table_fields = array('refAuthor', 'body', 'publicationLevel', 'title');
$table_values = array('test', 'test', 0, 'test');
$table_name = 'info';
//the next line raise an undefined function error
$sth = $db->autoPrepare($table_name, $table_fields, DB_AUTOQUERY_INSERT);
?>
What is wrong with this code? I give up!
Thanks for helping!