Jump to content
MakeWebGames

house tax


montyash

Recommended Posts

  • 2 weeks later...

Re: house tax

If its NOT going into the minus you must have a

WHERE clause in the query that prevents it....

So (Just an example)

I would guess you have this

$db->query("UPDATE users SET money=money-$tax WHERE money > 0");

For this to take them in the negative just take the WHERE out...

Example...

$tax = 5000;

$db->query("UPDATE user SET money=money-$tax");

That would go on ALL users....Im sure your error is in the WHERE cluase of the query running.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...