No result returned (odbc_query)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • werks
    New Member
    • Dec 2007
    • 218

    No result returned (odbc_query)

    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

    Code:
    $query = odbc_exec($odbc, "SELECT * FROM qryOPAC WHERE Title LIKE '%$exp%';") or die (odbc_errormsg());
    --
    Kenneth
    "Better Than Yesterday"
    Last edited by werks; Feb 14 '08, 12:19 AM. Reason: tag
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    Originally posted by werks

    Code:
    ....or die (odbc_errormsg());
    ...so what's the error message?

    Comment

    • ronverdonk
      Recognized Expert Specialist
      • Jul 2006
      • 4259

      #3
      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

      Comment

      Working...