EllisLab/CodeIgniter — Issue #788: PDO Driver determines field data using TSQL for mysql database
Author: onema
Created: 2011-12-15 16:08:18+00:00
State: open

I get the following error message

PHP Fatal error: Call to a member function field_data() on a non-object in /system/database/DB_driver.php on line 889
PHP Stack trace:
PHP 1. {main}() /index.php:0
PHP 2. require_once() /index.php:212
PHP 3. call_user_func_array() /system/core/CodeIgniter.php:359
PHP 4. Site->dashboard() /system/core/CodeIgniter.php:359
PHP 5. BlogPost->__construct() /application/controllers/site.php:50
PHP 6. DataMapper->__construct() /application/models/blogpost.php:45
PHP 7. DataMapper->DataMapper() /application/libraries/Datamapper.php:451
PHP 8. CI_DB_driver->field_data() /application/libraries/Datamapper.php:645

When using ORM with pdo driver. Further inspection of the code uncovers a bug in the PDO driver that uses TSQL to determine the field data. This causes an error when you connect to MySQL (which doesn’t speak TSQL).

Please see:

http://codeigniter.com/forums/viewthread/205637/P50/#961932
AND
http://codeigniter.com/forums/viewthread/205637/P50/#962103

For more information.