コード例 #1
0
 /**
  * Prepares a statement for execution and returns a statement object
  * 
  * @link http://www.php.net/manual/en/pdo.prepare.php
  * @param
  *            statement string <p>
  *            This must be a valid SQL statement for the target database
  *            server.
  *            </p>
  * @param
  *            driver_options array[optional] <p>
  *            This array holds one or more key=&gt;value pairs to set
  *            attribute values for the PDOStatement object that this method
  *            returns. You would most commonly use this to set the
  *            PDO::ATTR_CURSOR value to
  *            PDO::CURSOR_SCROLL to request a scrollable cursor.
  *            Some drivers have driver specific options that may be set at
  *            prepare-time.
  *            </p>
  * @return PDOStatement If the database server successfully prepares the
  *         statement,
  *         PDO::prepare returns a
  *         PDOStatement object.
  *         If the database server cannot successfully prepare the statement,
  *         PDO::prepare returns false or emits
  *         PDOException (depending on error handling).
  *         </p>
  *         <p>
  *         Emulated prepared statements does not communicate with the
  *         database server
  *         so PDO::prepare does not check the statement.
  */
 public function prepare($statement, array $driver_options = array())
 {
     return $this->driver->prepare($statement, $driver_options);
 }
コード例 #2
0
 public function prepare(&$statement, &$options)
 {
     if (!($st = parent::prepare($statement, $options))) {
         return false;
     }
     $result = oci_parse($this->link, $this->prepared);
     if (!$result) {
         $this->set_driver_error(null, EhrlichAndreas_Pdo_Abstract::ERRMODE_SILENT, 'prepare');
         return false;
     }
     $st->_set_result($result);
     return $st;
 }