typo
added LIMIT 1 to all SQL queries that should return just one or zero results