Example #1
0
 protected function setAttribute($name, $value)
 {
     if ($this->connection) {
         $this->connection->setAttribute($name, $value);
     }
     $this->dso->setOption($name, $value);
 }
Example #2
0
 /**
  * @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());
 }