Hello,
I tried to use the PDO driver for my 2nd database connection by setting this code to my model class:
$option['driver'] = 'pdo'; // Database driver name
$option['dsn'] = 'DSNname';
$option['host'] = 'xx.xx.xx.xx'; // Database host name
$option['port'] = '1433'; // Database host name
$option['user'] = 'sa'; // User for database authentication
$option['password'] = '$$$$$$$$$'; // Password for database authentication
$option['database'] = 'myDB'; // Database name
$option['prefix'] = ''; // Database prefix (may be empty)
$db = JDatabase::getInstance( $option );
parent::setDbo($db);
But prompted me an error : Fatal error: Cannot instantiate abstract class JDatabaseDriverPdo
Just wanted to ask if this driver is still on the development progress?
Thanks in advance! :)
You can't directly use JDatabaseDriverPdo as it's an abstract class, rather you'd need to use a subclass of it (in CMS 3.3, the SQLite and Oracle drivers are subclasses of it). As noted, in 3.4, a PDO MySQL driver is added.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-10-01 11:09:44 |
Labels |
Added:
000-CMS
|
issues.joomla.org/tracker/jtracker/518
Easy: No
Successfull Tests: 0
Unsuccessfull Tests: 0
Last updated on 11 Oct 2014 20:01:25 GMT
@dodinz are you sure by posting to Jissues repo? BTW The CMS support PDO only in 3.4 that is a develop Branche here: https://github.com/joomla/joomla-cms/tree/3.4-dev
See: joomla/joomla-cms@216b687