There is a database in MS Access, has it prepared (stored) with the name of testQuery:
PARAMETERS tour Number;
SELECT * FROM Tours WHERE ID = tour;
I am trying to run a query in PHP and pass to tour the parameter as follows:
// ..connect
$tour = 1;
$sth = $db->prepare("select * from testQuery");
$sth->bindParam(':tour', $tour, PDO::PARAM_INT);
$sth->execute();
I get the error:
SQLSTATE[07002]: COUNT field incorrect: -3010 [Microsoft][Driver ODBC Microsoft Access]
Too few parameters. Required 1. (SQLExecute [-3010] at ext \ pdo_odbc \ odbc_stmt.c: 254)
How to pass parameters to the prepared statement? There is a suspicion that prepared queries are not caused by the command "select", as well as something else.