SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Confirmed Halfwit
    Join Date
    Oct 1999
    Location
    Vancouver, BC, Canada
    Posts
    983
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Mysql 4 to Mysql 5 upgraded -- now get a query error but I have no idea why.

    Hello,

    Since upgrading to mysql 5.x, one of my PHP applications is giving this error:

    Error:db::query() failed.

    ERROR MESSAGE IS: Failed to run Query:

    insert into ec_event ( title, description, start_date, use_time, use_end_date, end_date, repeat, repeat_untill, repeat_mode, repeat_weekday, repeat_monthly_mode, repeat_every_number, repeat_every_weekday, repeat_every_month, active ) values ( 'Title goes here', 'Description goes here', '1235683200', '1', '', '1235683200', '', '1235721540', '', '4', '1', '1', '0', '0', '1' )

    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 'repeat, ' at line 8
    I have no idea what is wrong with the query...

    ... any ideas?

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    REPEAT is a statement type, so you can't use it as a column name without surrounding the word in `backticks` in each query.

  3. #3
    Confirmed Halfwit
    Join Date
    Oct 1999
    Location
    Vancouver, BC, Canada
    Posts
    983
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks you!
    - A simple online WYSIWYG editor for HTML code snippets.
    - Managed Web Hosting - $3.95/month (resellers welcome)
    - Why pay more? $8.95 domains & $9.95 SSL certificates!


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
  •