One of those solutions still leaves you vulnerable to other SQL injection methods. While it technically prevents those false logins, you're still wide open to other forms of SQL injection. I'm not sure why something like that would even be mentioned.