I have the following in my php.ini file
extension=php_oci8_11g.dll
extension=php_pdo_oci.dll
When I run phpinfo()
I get the following back:
Does PDO_OCI being blank mean i'm missing something - if so what?
Whilst going through Yii docs ( http://www.yiiframework.com/doc-2.0/yii-db-connection.html ) it says
Connection represents a connection to a database via PDO.
My queries have worked fine until, I've tried to use bindParam()
. In which now I get Class 'app\\models\\PDO' not found
as an error?
I have just ran if(class_exists("PDO"))
and it returned true.
I spent some time on gitter and looking into it. It does seem that I need to namespace PDO to run these queries as Ryan mentioned
So declare in the model.
use PDO;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.