I am currently trying to retreive results from my MS Access db. However I want to limit the number of results to seperate pages.
I am currently using the LIMIT expression in the form of:
$query = odbc_exec($odbc, "SELECT DISTINCT Plus.Desc, Plus.User2, Plus.Code, Cstr(Price) AS string_price FROM Plus WHERE Plus.Desc LIKE '%".$var_criteria[0]."%".$var_criteria[1]."%".$var_criteria[2]."%".$var_criteria[3]."%".$var_criteria[4]."%".$var_criteria[5]."%' LIMIT 0, 10") or die (odbc_errormsg());
Some parts above may look confusing, especially where I am querying $var_criteria. as a precaution, these DO work so this is not the problem with the query. The problem only occurs when I limit the results.
Is this a conflict with using ODBC to query MS Access??
I get the error msg:
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Plus.Desc LIKE 'criteria' LIMIT 0, 10'.
Any help appreciated.
Cheers.
I am also aware of the TOP statement, thatworks great for the first page so mabe someone knows of any parameters that can acompany this???
Or if anyone wishes to share their own paging methods with me that would be great.