The class creates the database queries replacing the wildcards and escaping the values. It then executes the query and returns a result object. Usage: $db = Database::getInstance(); $stmt = $db->prepare("SELECT * FROM tl_member WHERE city=?"); $stmt->limit(10); $res = $stmt->execute('London');
Пример #1
0
 /**
  * Execute a raw query and return a Database\Result object
  *
  * @param string $strQuery The query string
  *
  * @return Database\Result|object The Database\Result object
  */
 public function query($strQuery)
 {
     $objStatement = new \Database\Statement($this->resConnection, $this->blnDisableAutocommit);
     return $objStatement->query($strQuery);
 }