Name: Anonymous 2013-07-09 13:31
Since most of the /g/tards are presumably gone by now. I want to hear your PHP conspiracy theories again, /prog/. They're a bit intriguing.
mysql_real_escape_string() is unsafe and poor design. This is an argument made against an archaic part of PHP, you don't even need to use a framework for SQL sanitizing. There's a class called "PDO" that's a part of the standard library that allows you to bind variables to a SQL string, escaping them in the process. But a framework makes it even easier. Take Laravel as an example, running DB::table('touhous')->where('name', 'LIKE', 'Genjii')->first(); produces select * from `touhous` where `name` like 'Genjii' limit 1, all variables escaped, no possibility of SQL injection.