C API mysql not returning result set -


i have situation making serial select queries table on lamp box using c api. first query select single record (an order header). second query uses returned record number first query select line items indexed order header record number. first query works fine, second query returns 0 rows (either checking mysql_fetch_numrows() or while loop doing mysql_fetchrow()). print out sql on console , copy , paste mysql client. returns expected 3 records see in db. leads me conclusion sql statement correct.

i mysql_free_result() call after each query. since don't have ton of experience using c api i'm wondering if there else have close or free up. sequence of events is:

mysql_init() mysql_real_connect() mysql_query() mysql_store_result() mysql_fetch_row() mysql_free_result() mysql_query() mysql_store_result() mysql_fetch_row()        <--- fails, no error code, 0 rows returned 

the global variable involved in connection handle.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -