|
I wouldn't expect that error from it, but $id isn't defined anywhere in the script. So you are effectively pointing at id = null (where null isn't the same as IS NULL in SQL). Since no id will match null, there is therefore no results.
Perhaps the id should be coming from $_GET? $id = isset($_GET['id']) ? (int)$_GET['id'] : 0; for example?
|