By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,216 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,216 IT Pros & Developers. It's quick & easy.

No result returned (odbc_query)

werks
100+
P: 220
Please help me on this.. When i search for a specified string in my OPAC (Online Public Access Catalog) it doesn't return any result.. Im using PHP and MS Access. My query is like this

Expand|Select|Wrap|Line Numbers
  1. $query = odbc_exec($odbc, "SELECT * FROM qryOPAC WHERE Title LIKE '%$exp%';") or die (odbc_errormsg());
  2.  
--
Kenneth
"Better Than Yesterday"
Feb 14 '08 #1
Share this Question
Share on Google+
2 Replies


dlite922
Expert 100+
P: 1,584

Expand|Select|Wrap|Line Numbers
  1. ....or die (odbc_errormsg());
  2.  
...so what's the error message?
Feb 18 '08 #2

ronverdonk
Expert 2.5K+
P: 4,258
odbc_exec in itself does not return query results except for the RESOURCE ID.
After the exec you must read the result set by using some command like 'odbc_fetch_*', e.g.
[php]while ($row = odbc_fetch_row($query)) {
// handle the result row
}[/php]
Ronald
Feb 18 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.