Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    9
    Thanks
    4
    Thanked 0 Times in 0 Posts

    noob question, getting error on a simple line

    Hello all, why am I getting an error on this line? I see nothing wrong with it

    PHP Code:
    UPDATE dbtable11 SET `status`='11'date_modified NOW(), `price` = '6' WHERE `product_id` = '1 ' 

  2. #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,840
    Thanks
    3
    Thanked 448 Times in 438 Posts
    Posting the error would help.
    Finding out HOW to do something is called research, i.e. keep searching until you find the answer. After you attempt to do something and cannot solve a problem with it yourself, would be when you ask others for help.

  3. #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    15,045
    Thanks
    165
    Thanked 2,247 Times in 2,234 Posts
    UPDATE dbtable11 SET `status`='11', date_modified = NOW(), `price` = '6' WHERE `product_id` = '1 '
    I observe an extra space after the product_id value.

    btw, you shouldn't wrap number values with quotes while using in queries. Quotes are for strings.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  4. Users who have thanked abduraooft for this post:

    Goliath (05-08-2014)


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •