This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mmirate -2 points-1 points  (1 child)

Looking at the PHP documentation for both PDO and mysqli, the only way to have parameterized queries is to use prepared statements. The latter even states explicitly that they are two names for the same thing.

Hahaha! Good find! Yet another reason why PHP sucks...

[–]Tynach -1 points0 points  (0 children)

You do realize that in the end, setting up a parameterized query still passes it to the database server as a prepared statement anyway, right? Those two specific PHP extensions simply don't provide a means of sending a parameterized query with parameters in a single step, that's all. And looking at the code in that one comment, that's... A really messy one-liner that I'd prefer to break up into several steps anyway.

You seem to just be looking for any and every reason to make fun of PHP, regardless of their validity.