Soldato
- Joined
- 12 Apr 2004
- Posts
- 11,788
- Location
- Somewhere
I'm trying to run the following auto-executed query in MDB2 to add a new user to a table:
Whenever I run the script I get the following two errors:
The odd thing is that there's no 'Datatype.php' file listed in the MDB2 autogenerated documentation. The only files that might be related are the driver specific datatype class files under MDB2/Driver/Datatype.
Can anyone shed any light on this one?
PHP:
$fieldValues = array(/* ... */);
$fieldTypes = array(/* ... */);
$affected = $database->extended->autoExecute(TBL_USERS, $fieldValues, MDB2_AUTOQUERY_INSERT, null, $fieldTypes);
if (MDB2::isError($affected))
{
messageDie('Could not insert new user.', __FILE__, __LINE__, 'User name: ' . $this->name, $affected->getMessage(), $sql);
}
Warning: MDB2::include_once(MDB2/Datatype.php) [function.MDB2-include-once]: failed to open stream: No such file or directory in /home/***/public_html/bsc/backend/library/mdb2/MDB2.php on line 330
I've made sure that the Extended module is loaded like so, with no errors:Warning: MDB2::include_once() [function.include]: Failed opening 'MDB2/Datatype.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/***/public_html/bsc/backend/library/mdb2/MDB2.php on line 330
PHP:
// Set up database connection.
$debugLevel = (DEBUG > 0) ? 2 : 0;
$options = array('debug' => $debugLevel);
$database =& MDB2::factory(MDB2_DSN, $options);
if (MDB2::isError($database))
{
messageDie('Could not connect to database.', __FILE__, __LINE__, 'DSN: ' . MDB2_DSN, $database->message);
}
// Load necessary modules.
$database->loadModule('Extended');
The odd thing is that there's no 'Datatype.php' file listed in the MDB2 autogenerated documentation. The only files that might be related are the driver specific datatype class files under MDB2/Driver/Datatype.
Can anyone shed any light on this one?

Last edited: