Lets see the code that would cause the above behaviour. First there was some boiler plate code to write to execute a simple SQL statement (getting an ID from a 'posts' table for data that I know exists). There was a single bind parameter, ':id', in the SQL statement.
when the $binds variable was set as follows:
I was getting data back as expected...
However if I were to add some additional (non-sensical) bind parameter/value to the $binds array like this...
Instead of ignoring the bind parameter that does not appear in the SQL statement, PDO instead returned no data.
Additionally the following warning was emitted to the PHP error log:
The above all made sense, though I was half-expecting that PDO would simply ignore any extra bind parameters.