I researched a lot on the Internet, but I did not find anything that could help me use PDO in the encoder. I saw in the LI CI 2.1.0 change (I think) that the pdo driver was added to the framework. Now I am done with the database.php configuration file, which looks like this:
$db['default']['hostname'] = 'mysql:host=myhostname;port=myport';
$db['default']['username'] = 'myusername';
$db['default']['password'] = 'mypassword';
$db['default']['database'] = 'mydb';
$db['default']['dbdriver'] = 'pdo';
So, now (after a lot of wasted time to get the snippet above to work -.-), I do not get a connection error, but HOW DO I REQUEST NOW? I can't figure out what syntax will work and how to build queries. Does anyone have any clues?
PS: if you talk about why I need pdo in qi, the answer is my boss wants me to create a structured environment with:
- CI 2.x + (done)
- Smarty 3 (done)
- PhpUnit (not yet)
- PDO (not yet)
, - phpunit, . Ty