I try to get all rows which has a timestamp bigger then a value given in a variable or "0".
$pdo = $db->prepare('SELECT * FROM table ORDER BY id DESC, parent, cat WHERE timest >= :low OR timest = 0');
$pdo->bindParam(':low', $low, PDO::PARAM_INT);
$pdo->execute();
What is wrong with that?
I get a SQLState error 42000 (syntax error), but I don't understand why.