Typo in query causing query error (line 147 in db.php)