I am using ezSQL for database queries and connection and sometimes it gives data and sometimes it return no results.
Here is the debug code
Query [3] -- [SELECT * FROM table WHERE `id`=4]
Query Result..
No Results
CODE:
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;
}
The query is very simple, but it gives data sometimes only.
Can anyone have the idea about it?
I have tried to use ob_start() function on page start so if any cache or buffer it clears but doesn't work
Thanks,