Re: [PHP-DB] Instest of add, subtract.

2002-02-23 Thread Bogdan Stancescu
Well, there are quite some differences difference between the results these two pieces of code yield. Let's see what your sql query would be for the first version, replacing $deposit in $query: UPDATE wt_users set bank_points + $user_depositset points - $user_deposit WHERE uid={$session["uid"]

[PHP-DB] Instest of add, subtract.

2002-02-23 Thread Jennifer Downey
Hi, Instead of helping with my other question maybe you can tell me why this wont work? Is it not valid ? Can you not use strings in a query like this? $deposit="set bank_points + $user_deposit"; $deposit .="set points - $user_deposit"; $query = ("UPDATE wt_users $deposit WHERE uid={$session["u