BIG problem and I am new to php. Picked up someone elses code and now am trying to administer it....
The odbc_connect works fine but the following code doesn't:
function Query ($query) {
$countQueryString = "SELECT count(*) FROM ($query)";
$count = odbc_exec($this->id, $countQueryString);
$this->rows = odbc_result($count, 1);
$this->result = @odbc_exec($this->id, $query) or
ODBC_PrintErrorMsg ("Unable to perform query: $query");
}
the code is failing at the $count = odbc_exec($this->id, $countQueryString); part....?????
The error encountered is:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect in D:\Program files\Apache Group\Apache2\htdocs\sdnusers\util_odbc.php on line 47
I am really stuck and could do with help from ANYONE..... I have searched the net for posting for the same error, found heaps, but none seem to really relate to the code I have....
Thanks
😕 😕