SA-MP Forums Archive
Mysql Statment - 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: Mysql Statment (/showthread.php?tid=587048)



Mysql Statment - nezo2001 - 27.08.2015

I want to get data and pass it variable without providing the field number something like
PHP код:
SELECT pMoney FROM users WHERE username='BLA' 
But I got
Код:
Tage mismatch
When I do it like that


Re: Mysql Statment - Luke_James - 27.08.2015

PHP код:
SELECT `pMoneyFROM `usersWHERE `username` = 'BLA' 



Re: Mysql Statment - nezo2001 - 27.08.2015

My whole script without the (`) and it is working fine!
And I get the warning when I pass it to a variable....


AW: Mysql Statment - Macronix - 27.08.2015

Then show us the code.


Re: Mysql Statment - nezo2001 - 28.08.2015

PHP код:
                new UMoney[128];
                new 
Smoney[128];
                
format(Smoneysizeof(Smoney), "SELECT pMoney FROM users WHERE pName='%s'",CarInfo[i][owner]);
                
mysql_query(1Smoney);
                
format(UMoneysizeof(UMoney), "UPDATE users SET pMoney='%i' WHERE username='%s'",Smoney+CarInfo[i][CarPrice], CarInfo[i][owner]);
                
mysql_query(1UMoney); 



Re: Mysql Statment - Logofero - 28.08.2015

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
PHP код:
                new UMoney[128];
                new 
Smoney[128];
                
format(Smoneysizeof(Smoney), "SELECT pMoney FROM users WHERE pName='%s'",CarInfo[i][owner]);
                
mysql_query(1Smoney);
                
format(UMoneysizeof(UMoney), "UPDATE users SET pMoney='%i' WHERE username='%s'",Smoney+CarInfo[i][CarPrice], CarInfo[i][owner]);
                
mysql_query(1UMoney); 
PHP код:
CarInfo[i][owner// <- This is player ID or name? 
Your Waring occur because you are trying to save the format(); string <- integer