Pdo::query() Expects Parameter 1 To Be String, Object Given Warning
Im having a little issue with PDO. I posted another question about 2 minutes ago an that was answered pretty quickly but now I have another error. Here is the code:
Solution 1:
You don't need to call PDO::query(). For a prepared statement, you call PDO::prepare(), then PDOStatement::execute() performs the query and you can retrieve the result using PDOStatement::fetch*.
PDO::query() is only used for dynamic SQL; it takes as its argument the string SQL query statement eg. SELECT statement, &c.
Post a Comment for "Pdo::query() Expects Parameter 1 To Be String, Object Given Warning"