2 ms·
What deserves a lot of the blame is the awful mysql_* API, which didn't support query placeholders. (The mysqli and PDO APIs weren't available until much later,
by duskwuff 9y ago
What deserves a lot of the blame is the awful mysql_* API, which didn't support query placeholders. (The mysqli and PDO APIs weren't available until much later, and weren't reliably available on many web hosts for even longer.) This forced PHP developers to become comfortable with constructing SQL queries as strings -- a habit which proved hard to break for many of them.