Mysql Statment
#1

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

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

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

Then show us the code.
Reply
#5

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); 
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)