Ejemplo n.º 1
0
 public function __construct(MySQLConnection $cnx, $query)
 {
     parent::__construct($cnx);
     $this->query = $query;
     $parsed = self::$parser->parse($query);
     foreach ($parsed as &$elem) {
         $this->walk1($elem);
     }
     $this->name = uniqid('stmt_');
     $this->connection->exec(sprintf('PREPARE %s FROM \'%s\';', $this->name, self::$creator->create($parsed)));
 }
Ejemplo n.º 2
0
 public function __construct(PDOConnection $cnx, \PDOStatement $stmt)
 {
     parent::__construct($cnx);
     $this->stmt = $stmt;
 }