Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2004
    Location
    CA
    Posts
    59

    Exclamation Problem with my site, ANY help appreciated!

    Hey everyone,

    I've had a custom script built for a website I run. It's been worked on for 7 months and has cost me over $35,000. It has finally been finished. My site relaunched with this new script. My scripter who supposable has 20 years of experience decided to go on vacation for a week 2 days after my launch. Even after constant pestering for him to stick around he left anyways. For those 2 days we were fixing problems all day. The script is built very well in all other cases, but I'm stuck with a horrible problem. No one can register to my sites because of the following errors.

    Example 1: count doesn't match value count at row 1--insert into turnkeys_referrals values(NULL,20502,0,'pending',0,' ',31,1208485592)
    Example 2: Column count doesn't match value count at row 1--insert into turnkeys_referrals values(NULL,20487,0,'pending',0,' ',28,1208487891)

    I know this information does not help much at all. My site is located at OrderGiftsFree.com. If you can give me any idea on what needs to be done I can do my best to get it fixed. If you can describe what the numbers mean I can go through the database and fix any issues. I have some experiencing, but not much. Point me in the right direction and I'd be extremely grateful. Thanks in advance!

    Randy

  2. #2
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    The error indicates that the number of values you're trying to insert (8) doesn't match the number of fields in the table. Most likely your developer added / removed a field from the table but didn't update all his code to match.

    Go into PhpMyAdmin and run the query:
    Code:
    DESCRIBE turnkeys_referrals
    Last edited by foobic; 04-18-2008 at 12:05 AM. Reason: clarity (fields != values)
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  3. #3
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    665
    Foobic is right, though I feel the urge to interject a word!

    This type of stuff occurs when programmers get a bit lazy with SQL syntax. Instead of being nice and doing a:

    INSERT INTO table ( col1, col2, col3 ) VALUES ( '1', '2', '3' );

    They simply assume a full insertion

    INSERT INTO table( '1', 2', '3' );

    So down the road, if you adjust the table and add a column (these kinds of things are extremely likely); then you are forced to refactor your queries, which is a horrible waste of time. Not something I'd personally be pleased with after having paid such a high sum for something suchly built.

    Similar to what foobic posts however, you can issue:

    SHOW CREATE TABLE turnkey_referrals

    If you can post the schema construct here, we'll be able to help. If this is urgent, you can send a PM and I can put one of my guys on it as well (for a price of course).

    All the best.
    Alex
    circlical - hosting software development
    forums * blog

  4. #4
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    Quote Originally Posted by Saeven View Post
    Foobic is right, though I feel the urge to interject a word!

    This type of stuff occurs when programmers get a bit lazy with SQL syntax.
    Agreed. I thought about writing the same thing but in the end I was too lazy.
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  5. #5
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    665
    Now there's an interesting irony
    circlical - hosting software development
    forums * blog

  6. #6
    Join Date
    Jan 2006
    Location
    Athens, Greece
    Posts
    1,479
    I can only assume that the script went untested or there was quick database changes.
    Do a "SELECT * FROM turnkeys_referrals LIMIT 5"

    Then grab the error line below
    (NULL,20502,0,'pending',0,' ',31,1208485592)

    and see where the values above "match" to the query you selected.
    Hints: NULL is for the primary key (ID)- it should be the first, the last one is an int to some date value.

Posting Permissions

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