The difference between mysql_store_result and mysql_use_result is that after using mysql_query () for a query, one of these two functions is generally used to store the result in a MYSQL_RES * variable.
The main difference between the two is that the results of mysql_use_result () must be used up once. that is to say, after using mysql_fetch_row () to get a result, you must use mysql_fetch_row () repeatedly () read the result until the function returns null. Otherwise, if you perform another mysql Query, the error "Commands out of sync; you can't run this command now" will be returned.
Mysql_store_result () saves the result. you can perform another query without reading all the rows. For example, if you perform a query to obtain a series of records, and then use a loop to query the database, you can only use mysql_store_result ().