SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php - syntax error - my SQL

    Hi guys,

    I am installing K-Links which is a fantastic script but the customer support & service is terrible.

    Anyhow, it is a Links Directory site and when the customer is submitting a link (after they have completed the form & pressed submit) they are getting this:

    You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'when = 'test' WHERE l_id=9' at line 1

    the site is: www.widebrownweb.com.au

    I also get an error on the admin side of things when I am trying to delete links - looks v.similar to the one above.

    Any help/pointers/suggestions welcomed

    Thanks!!

    wbw

  2. #2
    Tranceoholic lilleman's Avatar
    Join Date
    Feb 2004
    Location
    Írebro, Sweden
    Posts
    2,716
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WHEN is a reserved word in MySQL. You'll have to place "backticks" around the field, like this:

    Code:
    UPDATE table SET `when` = 'test' WHERE l_id = 9
    ERIK RIKLUND :: Yes, I've been gone quite a while.


Bookmarks

Posting Permissions

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