SA-MP Forums Archive
Simultaneous querys with G-sTyLeZzZ MySQL plugin - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Simultaneous querys with G-sTyLeZzZ MySQL plugin (/showthread.php?tid=291308)



Simultaneous querys with G-sTyLeZzZ MySQL plugin - Blowfish - 19.10.2011

Hi,

I have a hard time getting a feature to work without saving like a hundred of rows in some array.
In other languages constructs like this do not cause any trouble:

PHP код:
new tmp[64];
mysql_query("SELECT `name` FROM `table_a`");
mysql_store_result();
while(
mysql_retrieve_row()) {
    
mysql_fetch_field_row(tmp"name");
    
format(QueryStringsizeof(QueryString), "SELECT `var` FROM `table_b` WHERE `name` = %s"tmp);
    
mysql_query(QueryString);
    
mysql_store_result();
    
printf("Var: %d"mysql_fetch_int());
    
mysql_free_result();
}
mysql_free_result(); 
I already tried using different connection handles but that does not really work out,
so please tell me how I can solve this problem.

Thanks,
Blowfish


Re: Simultaneous querys with G-sTyLeZzZ MySQL plugin - AndreT - 19.10.2011

Would be the best to use JOIN in your query.


AW: Simultaneous querys with G-sTyLeZzZ MySQL plugin - Blowfish - 19.10.2011

Thanks a lot man. This works perfectly
I never thought joins would be important for me.