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
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,151
    Thanks
    2
    Thanked 335 Times in 327 Posts
    Posting the error would help.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 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)

  • 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
    •