... if (!is_array($item) || count($item) === 0) { switch (json_last_error()) { case JSON_ERROR_DEPTH: $error = ' - Maximum stack depth exceeded'; break; case JSON_ERROR_CTRL_CHAR: $error = ' - Unexpected control character foun...
... if (!is_array($item) || count($item) === 0) { switch (json_last_error()) { case JSON_ERROR_DEPTH: $error = ' - Maximum stack depth exceeded'; break; case JSON_ERROR_CTRL_CHAR: $error = ' - Unexpected control character foun...
... if (!($this->link = @pg_connect($dsn))) { throw new XSException('Error connecting to PGSQL database:' . $param['dbname'] . '.'); pg_set_error_verbosity($this->link, PGSQL_ERRORS_DEFAULT); pg_query('SET standard_conforming_strings=off'); }}
... if (!($this->link = @pg_connect($dsn))) { throw new XSException('Error connecting to PGSQL database:' . $param['dbname'] . '.'); pg_set_error_verbosity($this->link, PGSQL_ERRORS_DEFAULT); pg_query('SET standard_conforming_strings=off'); }} query() 方法 pub...
...ink, $query); if ($res === false) { throw new XSException('PgSQL ERROR: ' . pg_last_error($this->link)); } $ret = array(); while ($tmp = pg_fetch_assoc($res)) { $ret[] = $tmp; } pg_free_result($res); return $ret;} 执行 SQL 语句查询
...>query($sql); if ($res === false) { throw new XSException('MySQL ERROR(#' . $this->obj->error . '): ' . $this->obj->errno); } if (!is_object($res)) { $ret = $res; } else { $ret = array(); while ($tmp = $res->fetch_assoc()) { $ret[] = $tmp; } ...
...link, $sql); if ($res === false) { throw new XSException('SQLITE ERROR: ' . sqlite_error_string($this->link)); } if (!is_resource($res)) { $ret = $res; } else { $ret = array(); while ($tmp = sqlite_fetch_array($res, SQLITE_ASSOC)) { $ret[] = $tmp; ...
...$this->link); if ($res === false) { throw new XSException('MySQL ERROR(#' . mysql_errno($this->link) . '): ' . mysql_error($this->link)); } if (!is_resource($res)) { $ret = $res; } else { $ret = array(); while ($tmp = mysql_fetch_assoc($res)) { $ret...
... $port = -1; } if (($sock = @fsockopen($host, $port, $errno, $error, 5)) === false) { throw new XSException($error . '(C#' . $errno . ', ' . $host . ':' . $port . ')'); } // set socket options $timeout = ini_get('max_execution_time'); $timeout = $timeout > 0 ? ($timeo...
...j = new mysqli($host, $user, $pass, '', $port); if ($this->obj->connect_error) { throw new XSException("Can not connect to mysql server: '$user@$host'"); } if (!$this->obj->select_db($param['dbname'])) { $this->close(); throw new XSException("Can not switch to database ...