Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jan 2007
    Posts
    226
    Plugin Contributions
    0

    Default Time Zone Offset -- Fixing a SQL syntax error?

    Hello,

    How do you go about fixing an SQL syntax error.

    After I installed the time zone offset mod, I get this error when I try to log into my admin:


    1064 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 '13 HOUR), '1', 'configuration.php', 'gID=5&', '121.79.14.170')' at line 1
    in:
    [insert into zen_admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (date_add(now(), INTERVAL +h 13 HOUR), '1', 'configuration.php', 'gID=5&', '121.79.14.170')]

    This is on zen 1.38 using the latest time zone offset mod.

    Is there somethingin that error message that would show someone how to fix ths issue?

    Any help would be greatly appreciated.

    Kind regards,
    Anthony

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Fixing a SQL syntax error?

    When, where and doing what do you see this error

    Or a link to it

  3. #3
    Join Date
    Jan 2007
    Posts
    226
    Plugin Contributions
    0

    Default Re: Fixing a SQL syntax error?

    Hello Kobra,

    Logging into my admin (ie. before even being able to enter in my username and password).

    It occurs at this link:

    http://www.xmanhosting.com.au/shop/admin

    It occurred after I entered in a value in admin --> config --> time zone offset.

    I haven't been able to use it since.

    Would be easier to just uninstall the time zone mod? If so, how would one go about this?

    Thanks for your time.

    KInd regards,
    Anthony

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Time Zone Offset -- Fixing a SQL syntax error?

    It occurred after I entered in a value in admin --> config --> time zone offset.
    What value did you enter???

    It looks like you might have entered "13"
    Code:
    13 HOUR), '0', 'login.php ', '', '76.25.247.55')' at line 1
    Where the allowable values defined by
    Code:
    Enter +h, 0 or -h where ''h'' is the number of hours.
    would be maxed at +12 or -12 and a 13 would probably cause a math error

    If you use phpmyadmin and edit the configuration table or export it edit and re-insert/import it

    look for 'TIME_ZONE_OFFSET'

    Always backup before making any DB alterations....

  5. #5
    Join Date
    Jan 2007
    Posts
    226
    Plugin Contributions
    0

    Default Re: Time Zone Offset -- Fixing a SQL syntax error?

    Hi Kobra,

    I think I did enter in "13" now that you mention it

    I'll have a go with your recommendations and i'll see how I go.

    Thanks for your help.

    Kind regards,
    Anthony

  6. #6
    Join Date
    Feb 2008
    Posts
    14
    Plugin Contributions
    0

    Default Re: Time Zone Offset -- Fixing a SQL syntax error?

    Quote Originally Posted by xman888 View Post
    Hello,

    How do you go about fixing an SQL syntax error.

    After I installed the time zone offset mod, I get this error when I try to log into my admin:


    1064 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 '13 HOUR), '1', 'configuration.php', 'gID=5&', '121.79.14.170')' at line 1
    in:
    [insert into zen_admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (date_add(now(), INTERVAL +h 13 HOUR), '1', 'configuration.php', 'gID=5&', '121.79.14.170')]

    This is on zen 1.38 using the latest time zone offset mod.

    Is there somethingin that error message that would show someone how to fix ths issue?

    Any help would be greatly appreciated.

    Kind regards,
    Anthony
    I had the same exact problem. I battled with it for over an hour, getting the warnings in my admin cp, and every time I set the offset to match what the warning was telling me, the warning went 5 hours the other way. So I left it blank and got that very same error as you so I gave up and uninstalled the whole mess. (And my time is still off by 5 hours)

  7. #7
    Join Date
    Jan 2007
    Posts
    226
    Plugin Contributions
    0

    Default Re: Time Zone Offset -- Fixing a SQL syntax error?

    Hello Kobra,

    Thanks for that - it worked a treat.

    I just exported the configuration table, then modified the Time Zone Offset part of it, then deleted the configuration table, then imported the newly saved configuration table.

    Thank you very much for that.

    Kind regards,
    Anthony

  8. #8
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Time Zone Offset -- Fixing a SQL syntax error?

    I just exported the configuration table, then modified the Time Zone Offset part of it, then deleted the configuration table, then imported the newly saved configuration table.
    Just a footnote to this: Time is plus GMT or minus GMT and the MAX offset is 12

  9. #9
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Time Zone Offset -- Fixing a SQL syntax error?

    Quote Originally Posted by kobra View Post
    Just a footnote to this: Time is plus GMT or minus GMT and the MAX offset is 12
    It can be more than this
    In Oz I run all my sites between +14 and +16 depending on daylight saving here and in the datacentre.

    If you use anything except a + or - prefix followed by a whole number it will crash.
    A quoted value "13" or a value like 13:00 will crash it

  10. #10
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,268
    Plugin Contributions
    3

    Default Re: Time Zone Offset -- Fixing a SQL syntax error?

    Quote Originally Posted by gilby View Post
    It can be more than this
    In Oz I run all my sites between +14 and +16 depending on daylight saving here and in the datacentre.
    +14 = -10
    +16 = -8

    You can't have >12 (+14 or +16) - there are only 24 hours in a day... 12 either side of GMT !
    20 years a Zencart User

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 25 Aug 2011, 05:58 AM
  2. 1064 You have an error in your SQL syntax - Time Zone Offset
    By clipegg in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 28 Oct 2010, 04:37 AM
  3. Time Zone Offset Error
    By 10gallons in forum Basic Configuration
    Replies: 5
    Last Post: 5 Sep 2009, 02:51 AM
  4. Help Error after insert of SQL for time offset mod
    By wmorris in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 8 Nov 2008, 03:03 AM

Posting Permissions

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