コード例 #1
0
ファイル: Connection.php プロジェクト: dario1985/adodb
 protected function setAttribute($name, $value)
 {
     if ($this->connection) {
         $this->connection->setAttribute($name, $value);
     }
     $this->dso->setOption($name, $value);
 }
コード例 #2
0
ファイル: StatementTest.php プロジェクト: phossa/phossa-db
 /**
  * @covers Phossa\Db\Pdo\Statement::prepare()
  * @covers Phossa\Db\Pdo\Statement::execute()
  */
 public function testExecute2()
 {
     // must emulate
     $this->driver->setAttribute('PDO::ATTR_EMULATE_PREPARES', true);
     $this->statement->prepare("SELECT :idx, :color");
     $res = $this->statement->execute(['idx' => 1, 'color' => 'red']);
     $this->assertEquals([[1 => "1", "red" => "red"]], $res->fetchRow());
 }