Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/61.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php ezSQL异常行为_Php_Mysql_Ezsql - Fatal编程技术网

Php ezSQL异常行为

Php ezSQL异常行为,php,mysql,ezsql,Php,Mysql,Ezsql,我使用ezSQL进行数据库查询和连接,有时它提供数据,有时不返回结果 下面是调试代码 Query [3] -- [SELECT * FROM table WHERE `id`=4] Query Result.. No Results 代码: 查询非常简单,但有时只提供数据 有人知道这件事吗 我曾尝试在页面开始时使用ob_start()函数,以便在任何缓存或缓冲区被清除但不起作用时使用 谢谢 public function select($table, $rows = '*', $where

我使用ezSQL进行数据库查询和连接,有时它提供数据,有时不返回结果

下面是调试代码

Query [3] -- [SELECT * FROM table WHERE `id`=4]
Query Result..

No Results
代码:

查询非常简单,但有时只提供数据

有人知道这件事吗

我曾尝试在页面开始时使用ob_start()函数,以便在任何缓存或缓冲区被清除但不起作用时使用

谢谢

public function select($table, $rows = '*', $where = null,$datatype = 'results') {
        global $db;
        $q = 'SELECT ' . $rows . ' FROM ' . $table;
        if ($join != null) {
            $q .= ' JOIN ' . $join;
        }
        if ($where != null) {
            $q .= ' WHERE ' . $where;
        }
        self::prt_debug("db", $db );
        self::prt_debug("SELECT Query", $q );
        if ($datatype == 'row')
            $results = $db->get_row ( $q );
        else
            $results = $db->get_results ( $q );
        $db->debug();
        return $results;
}