Posted on Wednesday 16th May 2007 at 11:09 PM | |
Diablosblizz Senior Member |
Lets get right to it: Code You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM members WHERE username = 'Diablosblizz'' at line 1 Heres my code: PHP Code
1
$cgc = mysql_query("UPDATE money SET money = '$getcm' FROM members WHERE username = '$checkuser'") or die (mysql_error());
** I have defined the variables I was wondering what the heck did I do wrong!? Thanks! |
Posted on Thursday 17th May 2007 at 05:37 AM | |
SkillMaster Senior Member |
Change the code to... Code $cgc = mysql_query("UPDATE money SET money = '$getcm' WHERE username = '$checkuser'") or die (mysql_error()); Because you're doing two commands in one query not allowed or something like that but there ya go. |
Posted on Thursday 17th May 2007 at 03:21 PM | |
Diablosblizz Senior Member |
Table 'diablosb_users.money' doesn't exist Thats what I get when I do that mysql query you gave me :(. |
Posted on Thursday 17th May 2007 at 07:25 PM | |
ShadowMage Senior Member |
if mems is your table, is there a field named 'money' in it? though you can change it as you know :P If so try: Code $cgc = mysql_query("UPDATE mems SET money = '$getcm' WHERE username = '$checkuser';"); or die(mysql_error()); |
Posted on Thursday 17th May 2007 at 07:38 PM | |
Diablosblizz Senior Member |
Fixed! Thanks Shadow! |
Posted on Thursday 17th May 2007 at 08:57 PM | |
SkillMaster Senior Member |
Sorry I didn't know which one was your tables... |