Posts: 737
Threads: 338
Joined: Jan 2013
Hi,
Can i use mysql_query, when i load something? like:
mysql_query("blabla");
mysql_store_result( );
Code:
if( mysql_num_rows( ) )
{
while(mysql_fetch_row_format(StringLoading[ playerid ]))
{
sscanf(blablabla
mysql_query("BLABLsdasdasdABLA");
}
}
I want to say, can i use any queries, until i don't use mysql_free_result?
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Results must be freed otherwise you'll just get an out of sync error. That said, if you need to create a query that relies on the results of the previous query then you're doing something wrong.
Posts: 7
Threads: 1
Joined: Mar 2012
Reputation:
0
I think it will be fine if you don't need to store any new results.
Posts: 737
Threads: 338
Joined: Jan 2013
I have house system, i store all in my mysql database. There is x,y,z pickupid, interior.... But if i add new pickups, then i too need to change pickupid in database, because when i load hous'es, i create pickup too, if house is owned or not owned, i create labels and so on. And when you buy hous'e, when you go on pickup you can buy house, and i change owner name in database where pickupid is that pickup what you picked.
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
Runtime pickup ID's and database pickup ID's are not always going to be the same. You should not be storing the pickup ID itself in the database; that's just pointless!
Posts: 737
Threads: 338
Joined: Jan 2013
That's why, am trying to renew database pickup id, when i create them when i loading. But i don't know exelent. Can i use mysql_query, when am not free_result ? because now am using, and no problems, but anyway, need good answer. I think if query is not with store_result() you can add more queries, and when you finish all, then you free_result() am right?