public function DbResult($result, DbStateHandler $dbStateHandler)
 {
     try {
         parent::__construct($result, $dbStateHandler);
     } catch (Exception $e) {
         throw $e;
     }
 }
 function q($sql)
 {
     $debugsql = "select debugmysql from web where id='" . WEB_ID . "'";
     $data1 = new DbResult(mysql_query($debugsql, $this->connection));
     $data = $data1->fetch_row();
     if ($data[0]) {
         $GLOBALS["debug"] .= 'DEBUGIN INFO<br />' . $sql . '<br />';
     }
     if (!($res = @mysql_query($sql, $this->connection))) {
         $this->errorMsg = 'Query failed: ' . mysql_error($this->connection) . ' SQL: ' . $sql;
     }
     if ($res) {
         return $res;
     } else {
         return null;
     }
 }
 public function __construct(DbConnection $dbConnection, $result, \Bitrix\Main\Diag\SqlTrackerQuery $trackerQuery = null)
 {
     parent::__construct($dbConnection, $result, $trackerQuery);
 }
Exemple #4
0
 /**
  * Fetch resultset to an array from the previous query as objects.
  *
  * @param DbResult $query
  *   The DbResult object that is being evaluated.
  * @return array
  *   Contain all rows data as objects from $query;
  *   if no record in $query, return an empty array
  */
 public function fetch_object_all(DbResult $query)
 {
     return $query->fetch_object_all();
 }