データベースのクエリと接続に ezSQL を使用していますが、データが返されることもあれば、結果が返されないこともあります。
ここにデバッグコードがあります
Query [3] -- [SELECT * FROM table WHERE `id`=4]
Query Result..
No Results
コード:
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;
}
クエリは非常に単純ですが、時々しかデータが得られません。
誰でもそれについて考えられますか?
ページの開始時に ob_start() 関数を使用しようとしたので、キャッシュまたはバッファがクリアされても機能しません
ありがとう、