Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: Invalid parameter number:
问题 I am attempting to use the following code to search a database using words in a search field. For some reason I am getting the following error Warning: PDOStatement::bindValue() [pdostatement.bindvalue]: SQLSTATE[HY093]: Invalid parameter number: Columns/Parameters are 1-based in.. Here is the function code: // Retrieve search results function retrieve_search_posts($searchfield){ //test the connection try{ //connect to the database $dbh = new PDO("mysql:host=localhost;dbname=mjbox","root",