Yii 1.1: phppdo

PDO emulation library
20 followers

This extension allow use PHPPDO library for emulate PDO functionality.

Sometimes hosting providers disable PDO wholly or PDO_ particularly. This extension allow you to use PHP-emulated PDO class on that hostings.

Resources

Documentation

Requirements

  • Yii 1.0 or above

Installation

  • Extract the release file under protected/extensions

Usage

For use it add in config/main.php:

...
   'db'=>array(
      'class'=>'application.extensions.PHPPDO.CPdoDbConnection',
      'pdoClass' => 'PHPPDO',
      ...
      ),
   ...

Change Log

Mar 7, 2010

  • PHPPDO version bump, thanks to rohit.

Sep 15, 2009

  • Fixed bug (PDO.php not found), thanks to Swarog.

June 15, 2009

  • Fixed bug, thanks to Ryuuzaki.

June 9, 2009

  • Fix for forced use of PHPPDO library: just add 'phpClass'=>'PHPPDO' db component parameter.

April 7, 2009

  • Initial release.

Total 20 comments

#18629 report it
Juan David Rodriguez at 2014/12/03 06:16pm
Thanks

thankyou so much!

#17426 report it
Blake-R at 2014/06/11 12:30am
RE: Is this extension still being updated/fixed?

MetaYii, I alive. But upstream project doesn't have any updates since 1.4.

#17425 report it
MetaYii at 2014/06/10 03:09pm
Saved my skin!

It looks like you saved my skin with this, for a large project being migrated to Oracle. Is this extension still being updated/fixed, BTW?

#15965 report it
Hermans at 2014/01/05 01:52am
thanks, for good extension !!

thank you, this is very good extension.

my app work fine in all php version without PDO :)

#14238 report it
Charly Rosero at 2013/07/29 11:30am
Works Great

awesome extension, thanks ... finally i solved my problem

#14180 report it
Michael Sullivan at 2013/07/24 03:38pm
Possible to use PHPPDO in multi-db setup??

I have a project where I need to connect to both MySQL and MSSQL databases, but unfortunately the client's host cannot install PDO_DBLIB and hence to PDO for the MSSQL database... Is it possible to use phppdo in this context?? My thought was no, since the docs for multiple databases want you to put 'class'=>'CDbConnection' and your docs say to put 'class'=>'application.extensions.PHPPDO.CPdoDbConnection' so I figured that would be a problem.

Any suggestions?

#11418 report it
cnlevy at 2013/01/13 02:48am
RE: RE: Bug in PHPPDO

I also never did... until I started using

http://www.yiiframework.com/extension/activerecord-relation-behavior

which autogenerated this query

#11401 report it
Blake-R at 2013/01/11 06:37am
RE: Bug in PHPPDO

cnlevy, thank you.

Bugs in project PHPPDO firstly must be sent to it author. Contact can be found at http://sourceforge.net/projects/phppdo.

If author of PHPPDO doesn't answer or I'm loose new version, I'm try to find time for export project to github - just wait for some 'Thumb up' on this post.

I'm just more often use <> instead of != (hm... in fact, I'm never utilize !=).

#11400 report it
cnlevy at 2013/01/11 05:59am
Bug in PHPPDO

It doesn't parse properly opertors like != I tried this statement:

UPDATE `item` SET `delivery_order_id`=NULL WHERE (id!=92) AND (delivery_order_id=32)

PHPPDO transforms it to

UPDATE `item` SET `delivery_order_id` = NULL  WHERE (id! = 92 ) AND (delivery_order_id = 31)

I found the line where the code is incorrect, but i can't change the source ! Need someone to move the project to GitHub

The bug is in PHPPDO/divers/base_statement.php line 851 You have to change

return implode(' ', $prepared);

to

return implode('', $prepared);

and it works

#10261 report it
Rajib Rakhmit at 2012/10/15 01:15pm
Awesome Extension

Thanks For This Awesome Extension.

#10188 report it
playdog at 2012/10/09 06:45pm
Los Amo

Los adoro, Gracias Dios por esta gran comunidad, me han solucionado un gran problema laboral, Gracias. Esta libreria funciona perfecto, emula muy bien los driver PDO que no estan habilitados en Hosting Mediocres pero que toca usarlos por motivos laborales.

Gracias

#5901 report it
Iza at 2011/11/23 02:53pm
Thx :D

I had problems with the pdo_oci driver and this extension solved the problem :)

#4457 report it
iamnotcoward at 2011/07/10 10:33pm
Great

Solved a big problem for me. Thanks.

#4386 report it
qijunz at 2011/07/04 05:01am
but how to set in the config/main.php

i failed 'db'=>array( 'class'=>'application.extensions.PHPPDO.phppdo', 'pdoClass' => 'PHPPDO',

        'connectionString' => 'mysql:host=localhost;dbname=yii',
        'emulatePrepare' => true,           
        'username' => 'root',
        'password' => '123456',
        'charset' => 'utf8',
        'tablePrefix'=> 'tbl_',         
    ),
#231 report it
xhumanx at 2010/08/01 09:38pm
helpful

some web hosting disabled PDO extension, and this extension emulates PDO very well. really helps me a lot. Thanks.

#694 report it
dongbeta at 2010/03/17 07:36am
Thank You

Need it. my host's pdo is not available!

#750 report it
rohit at 2010/03/06 02:54am
Helped me a lot

On few hostings, pdo extension is not available! So, in that case this extension is very helpful. The original classes have been upgraded from 1.2(which is used in this extension) to 1.4 by now. If the author of this extension does an upgrade it will be great. I just found, that only one class is for extension other files will just need update from original PHPPDO extension. Good work. And very good example of extension!

#1228 report it
zhouyang at 2009/10/20 12:16am
太牛叉了。很实际的东西

very good!

#1436 report it
Ismael at 2009/08/03 12:23pm
Works great.

This extension is very good.

Unfortunately PDO_MYSQL is disabled here and this extesion emulates very good the the real PDO.

#1456 report it
yingyang at 2009/07/30 08:24am
Why?

I do not understand the sense of this extension - yii is based on pdo, so what does your extension? Please write more about it.

Leave a comment

Please to leave your comment.

Create extension