Web Analytics Made Easy -
StatCounter Can somebody tell me whats wrong with this query? - CodingForum

Announcement

Collapse
No announcement yet.

Can somebody tell me whats wrong with this query?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can somebody tell me whats wrong with this query?

    PHP Code:
       mysql_query("UPDATE users_rpg SET 
    eq
    $item[cat]=$id,
    spent=spent-
    $pitem[coins]*0.6+$item[coins] WHERE uid=$loguserid"
    or print 
    mysql_error(); 
    All $codes are explained in the file,but the only erro I get its this "*0.6"

    So hmm any help?
    Last edited by guelphdad; Sep 28, 2006, 07:59 PM.

  • #2
    I think you need brackets around your math like this:
    PHP Code:
       mysql_query("UPDATE users_rpg SET 
    eq
    $item[cat]=$id,
    spent=(spent-
    $pitem[coins]*0.6+$item[coins]) WHERE uid=$loguserid"
    or print 
    mysql_error(); 

    Comment


    • #3
      Thanks it worked,but I had to add a (' ') not ( ) only.But thanks!

      Comment

      Working...
      X