+ Reply to Thread
Results 1 to 3 of 3

Thread: Help with MySQL error

  1. #1
    stpvoice's Avatar
    stpvoice is offline Community Support Rep stpvoice has a brilliant futurestpvoice has a brilliant futurestpvoice has a brilliant future
    Join Date
    Dec 2008
    Location
    United Kingdom
    Posts
    5,890

    Help with MySQL error

    SQL ERROR [ mysql4 ]

    Out of range value adjusted for column 'poll_length' at row 1 [1264]

    SQL

    I'm getting this error in phpbb when trying to reply to a topic with a poll. I don't know what is wrong, but I read somewhere that it is because MySQL is running in strict mode or something like that. Has anyone got any ideas??


    UPDATE phpbb3_topics SET forum_id = 82, icon_id = 0, topic_approved = '1', topic_title = 'Points Shop', topic_first_poster_name = 'Administrator', topic_type = 2, topic_time_limit = 0, poll_title = 'Do You Think It Is Worth Reinstalling The Points Shop?', poll_start = '1262458004', poll_max_options = '1', poll_length = 52254720000, poll_vote_change = '0', topic_last_view_time = 1262630384, topic_attachment = 0 WHERE topic_id = 188

    BACKTRACE

    FILE: includes/db/mysql.php
    LINE: 174
    CALL: dbal->sql_error()

    FILE: includes/functions_posting.php
    LINE: 2198
    CALL: dbal_mysql->sql_query()

    FILE: posting.php
    LINE: 1346
    CALL: submit_post()


  2. #2
    misson is offline Community Advocate misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,391

    Re: Help with MySQL error

    Presumably, `poll_length`has type INT. The maximum size of an INT is 2147483647 (signed) and 4294967295 (unsigned). Setting poll_length to 52254720000 is the problem (it's out of the range of valid INTs).

    52254720000 seconds is 86400 weeks (52254720000 / (60*60*24*7); 86400 also happens to be the number of seconds in a day). What's probably happened somewhere is that a quantity representing days was wrongly converted to seconds twice (i.e. twice multiplied by 86400). Find the plugin, fix the code, submit a patch.
    Last edited by misson; 01-04-2010 at 08:56 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #3
    stpvoice's Avatar
    stpvoice is offline Community Support Rep stpvoice has a brilliant futurestpvoice has a brilliant futurestpvoice has a brilliant future
    Join Date
    Dec 2008
    Location
    United Kingdom
    Posts
    5,890

    Re: Help with MySQL error

    I've fixed it now.

    One of the mods I installed managed to add an extra set of quotes into a file, which was messing things up.


+ Reply to Thread

Similar Threads

  1. MySQL Error
    By pvivekk in forum Free Hosting
    Replies: 4
    Last Post: 10-18-2009, 04:40 AM
  2. MYSQL error
    By lightning yoshi in forum Free Hosting
    Replies: 1
    Last Post: 10-09-2009, 10:22 PM
  3. site Offline mysql error 111
    By ciellauren in forum Free Hosting
    Replies: 4
    Last Post: 10-09-2009, 01:56 PM
  4. Same mySQL error as "killers_clan"
    By banthewo in forum Free Hosting
    Replies: 1
    Last Post: 10-01-2008, 04:46 PM
  5. New Site-Suggestions?
    By mnoutside in forum Review My Site
    Replies: 9
    Last Post: 08-27-2008, 08:01 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
x10hosting free hosting for the masses
dedicated servers