I prepare my DB request for prevent SQL injection with the extension Mysqlnd. A request like this work on my site :
SELECT a, b FROM table where a = ?;
This next request doesn't work on my site:
SELECT a, b FROM table where b > DATE_SUB(CURRENT_TIMESTAMP(),INTERVAL ? ?);
Error log : PHP Fatal error: Call to a member function execute() on a non-object in ..." This is because the syntax of the request is wrong.
When I try it in my DB IDE, the double question mark count as one and not as 2 parameters.
How can I resolve this problem ?