예제 #1
0
 /**
  * Quotes a given input parameter.
  *
  * @param mixed $input Parameter to be quoted.
  * @param string $type Type of the parameter.
  * @return string The quoted parameter.
  */
 public function quote($input, $type = null)
 {
     $this->connect();
     return $this->_conn->quote($input, $type);
 }
예제 #2
0
 /**
  * Quotes a given input parameter.
  *
  * @param mixed       $input The parameter to be quoted.
  * @param string|null $type  The type of the parameter.
  *
  * @return string The quoted parameter.
  */
 public function quote($input, $type = null)
 {
     $this->connect();
     list($value, $bindingType) = $this->getBindingInfo($input, $type);
     return $this->_conn->quote($value, $bindingType);
 }
예제 #3
0
 /**
  * Creates a new session with the given $id and $data
  *
  * @param string $id
  * @param string $data
  *
  * @return Boolean
  */
 private function createNewSession($id, $data = '')
 {
     $this->con->exec(sprintf("INSERT INTO {$this->tableName} (sess_id, sess_data, sess_time) VALUES (%s, %s, %d)", $this->con->quote($id), $this->con->quote(base64_encode($data)), time()));
     return true;
 }