rille95 Posted August 29, 2009 Share Posted August 29, 2009 Hi! I've the gpt script from getpaidscene.com and i am trying to code a percentage referral sytstem. I've coded it so when i approve an offer that user have maid this code runs : mysql_query("update users set total_earned=total_earned+$refreward,current_balance=current_balance+$refreward where username=$referrer",$c) or die (mysql_error()); of course that's not all the code but that is where the problem is. i get this error message : Unknown column 'blazer' in 'where clause' but i am 100% sure that blazer is a user. Quote Link to comment https://forums.phpfreaks.com/topic/172378-unknown-column-in-where-clause-problem/ Share on other sites More sharing options...
Prismatic Posted August 29, 2009 Share Posted August 29, 2009 Because you're not wrapping your string $referrer in quotes, MySQL is treating it as a column. mysql_query("UPDATE users SET total_earned = total_earned + $refreward, current_balance = current_balance + $refreward WHERE username='$referrer'", $c) or die (mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/172378-unknown-column-in-where-clause-problem/#findComment-908863 Share on other sites More sharing options...
rille95 Posted August 29, 2009 Author Share Posted August 29, 2009 THX that was the problem! Quote Link to comment https://forums.phpfreaks.com/topic/172378-unknown-column-in-where-clause-problem/#findComment-908897 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.