Hi - I am using ODBC with PHP 5. I know how to prepare and execute a statement that does not need to return a result set. For instance an UPDATE statement. But I cannot figure out how to execute a prepared SELECT statement that I can then iterate through the results to get at all the rows.
For instance:
"SELECT foo from table where col1 = ?"
I can then use odbc_prepare, and odbc_execute and the statement runs without an error.
However odbc_execute only returns a boolean to indicate success or failure. I can't figure out how I am supposed to get a "resource' returned that I can then use in statements like odbc_fetch_into.
Am I missing something or is it not possible to use a prepared statement and odbc_execute to get at a result set of rows?
Any help is greatly appreciated. Thanks!!