Пример #1
0
 /**
  * Sends a query to the database
  *
  * @param DBQuery $q the query to send
  * @return DBResult the result
  * @throws BadFunctionCallException if the query reveals errors
  */
 public function query(DBQuery $q)
 {
     $res = $q->query();
     if ($this->log_path !== null) {
         @error_log($q->toSQL() . "\n", 3, $this->log_path);
     }
     return $res;
 }
Пример #2
0
		function deletePluginTable($tableName) {
			global $database;
			$tableName = $db->escape($tableName);
			DBQuery::query("DROP {$database['prefix']}{$tableName}");
			return true;
		}