function __construct($res, Query $obQuery) { $this->result = $res; $this->table_map = $obQuery->getTableMap(); $this->query_type = $obQuery->getType(); $this->arFieldsEntity = $obQuery->getFieldsEntity(); $this->sql = $obQuery->getQueryBuildParts(); if ($res) { if ($this->query_type == "select") { $this->mysql_num_fields = mysql_num_fields($res); $this->mysql_num_rows = mysql_num_rows($res); } } }