mysql lodaing.
#1

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?
Reply
#2

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.
Reply
#3

I think it will be fine if you don't need to store any new results.
Reply
#4

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.
Reply
#5

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!
Reply
#6

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)