/** * 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); }
/** * 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); }
/** * 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; }