[EXTENSION] oci8Pdo

Hello all,

This is the forum thread for the oci8Pdo extension.

Note, if you have an Issue or Problem, please make an Issue on the Github page.

If you guys and girls have any feedback, I’d love that!

Greetings,

yjeroen

I want to configure yii with Oracle Db. I use this oci8Pdo extension. But when I ran gii Model generator and CRUD generator are not working. what is the problem there?

Updated the extension!

@Monirul, Gii works as normal with this extension. Note that if you use older versions of Yii, Gii will only look at the ‘db’ component. If your oracle connection is inside an ‘OracleDb’ component, you will have to rename it temporarily.

Hello yJeroen

i am new of yii and oci8pdo, and i’m trying to verify if is the right framework for me.

i’d like to know how to include oci8pdo as a standard db in yii

for now i’ve just menage to test it inserting in a controller a code like this :

$oci = Yii::app()->dbOracle;

$command = $oci->createCommand();

$rows = $command->setText("select 1 from dual")->queryAll();

echo print_r($rows, true);

but i didnt manage to use for esample gii

what i have to do ?

thanks a lot

Jay

Hello!

I encountered the following exception:

Second and third parameters are not implemented for Oci8PDO_Statement::setFetchMode()

Someone has already implemented this method?

/app/protected/extensions/oci8Pdo/pdo/oci8/Oci8PDO_Statement.php:477-496


    /**

     * Set the default fetch mode for this statement

     *

     * @param int $fetchType

     * @param mixed $colClassOrObj

     * @param array $ctorArgs

     * @return bool

     */

    public function setFetchMode($mode,

                                 $colClassOrObj = null,

                                 array $ctorArgs = array())

    {

    	//52: $this->_statement->setFetchMode(PDO::FETCH_ASSOC); 

    	if($colClassOrObj !== null || !empty($ctorArgs)) {

    		throw new PDOException('Second and third parameters are not implemented for Oci8PDO_Statement::setFetchMode()');

    		//see http://www.php.net/manual/en/pdostatement.setfetchmode.php

    	}

    	$this->_fetchMode = $mode;

    	return true;

    }

Thank you!