I have a query in PHP framework nette... it looks like this
$result = $db->query("SELECT * FROM table")->fetchAll(); //count($result) = 20874;
But then I do this for testing purposes:
$result = $db->query("SELECT * FROM table WHERE value = '123'")->fetchAll(); //count($result) = 12;
$result = $db->query("SELECT * FROM table WHERE value <> '123'")->fetchAll(); //count($result) = 20874;
The problem is, when I iterate through $result from first classic query like this
foreach($result as $r){
if($value == "123"){
print_r("I FOUND HIM");die();
}
}
It never "finds him". I mean the rows are obviously there, but aren't in query results without condition. Is it possible, that there is any limit? Thanks