SA-MP Forums Archive
Data always equal 0 - 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: Data always equal 0 (/showthread.php?tid=589090)



Data always equal 0 - nezo2001 - 15.09.2015

PHP код:
new select[200];
             
format(selectsizeof(select), "SELECT storge FROM houses WHERE id='%i'"PlayerInfo[playerid][pHouseID]);
            new 
Cache:cache mysql_query(1select);
            new 
money;
            
cache_get_field_content_int(0"storge"money); 
It isn't equal 0 in the database but when I get it in the game it equals 0


Re: Data always equal 0 - Roberto80 - 15.09.2015

Idk about mysql but i saw somthing like this:
"SELECT `storage` FROM `houses` WHERE `id` = `%e`"


Re: Data always equal 0 - Vince - 15.09.2015

Read the manual. https://sampwiki.blast.hk/wiki/MySQL/R33...ld_content_int

Also please learn when and how to thread.


Re: Data always equal 0 - nezo2001 - 15.09.2015

I don't thread unless I don't find a way to solve the problem which I have or I don't even find the problem.


Re: Data always equal 0 - Vince - 15.09.2015

Seriously ... It should be the other way around, i.e. not threading if the problem can't be solved with threads, which is rare.