can anybody show me an example of how i would use the mysql function mysql_store_result()?..... i've been looking and i haven't found any examples, and i can't understand how they explain the structure of it on the mysql documentation (http://dev.mysql.com/doc/mysql/en/my...re-result.html) they tell me this:
MYSQL_RES *mysql_store_result(MYSQL *mysql)
but i dont understand wat that means....
could u please also explain how to use mysql_stmt_data_seek()... they describe it as
void mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset)
but i dont understand that either....
can anybody help?
04-21-2005, 09:22 PM
MetalSkin
MYSQL_RES * mysql_store_result(MYSQL * mysql)
means that you parse in a pointer to a MYSQL instance and you get back a pointer to a MYSQL_RES instance. I presume that they are structs, but not sure without checking the doco.
I'll do a search after lunch for an example for you.
The second one is similar to a standard seek function... so:
as you can see, the result set from the query is stored by calling mysql_store_result. The param is the connection and the returned value is the result set.
You use the result set to iterate through all the returned sets of data from the query. i think the example shows it quite clearly, so I wont post the example. If you have any questions about it, just add a post to this thread.
ahh, the function mysql_stmt_data_seek is used to seek to a specific result in the result set from your query. the example thats in the link above doesn't use it, mainly because not many people would. unless you have a specific need for it (which one doesn't come to mind immediatly) then i wouldn't worry about it.