Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2003
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Which of you PHP/OSC Gurus Can Answer This?

    Hi,

    I hired a coder to build this site http://www.colishcreations.com and it's having some problems - I'm hoping that one of you osc gurus can help me with this. Since then I've started building the osc sites on my own, but for now I still have this little problem site to fix and can't seem to figure the error out. I know the answer is probably staring me in the face, but I can't find it.

    When my client tries to add attributes she gets this error:
    1136 - Column count doesn't match value count at row 1
    insert into products_attributes values ('', '43', '2', '3', '0', '+')
    [TEP STOP]

    Any ideas on how to fix?
    This is how I read the attribute values
    ' ' - not sure what this refers to - it seems that this referes to a blank space in one of the value fields, but I can't figure out why. I think that the product ID should be coming up there

    43 - Product Name

    2 - Option Name

    3 - Option Value

    0 - Value Price

    + - Prefix


    So do you have any ideas on how to fix this?

    The attributes to the products that were originally added to the store can be modified just fine. However when my client tries to add attributes to the newly added products she gets the error message. She did a fine job adding the products so its not a problem there.



    Thanks
    MaFunk

  • #2
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Did you add the attributes copier contribution?
    We got a similar error after adding that because the order of the fields in the old table and the new table is different.

  • #3
    New Coder
    Join Date
    Sep 2003
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Run this

    insert into products_attributes values ('43', '2', '3', '0', '+');

    does it work?

    if so remove all the extra '', in the beginning of (s

  • #4
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The reason for the first '' is because the first field is an autoincrement field, mysql will automatically generate the first value.

    The problem is that after adding any contributions that affected the products_attributes table, the structure is different and the query is no longer valid.

    If you added anything that changed this table you will need to go into the code and change the line,
    insert into products_attributes values ('', '43', '2', '3', '0', '+')
    so that the number of items in the brackets lines up with the columns in the table.

    If you didn't add anything, then I apologise, I don't know why it is causing this error.

  • #5
    New Coder
    Join Date
    Oct 2003
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    how about....
    assuming the table stucture is
    id, field1, field2, field3, field4, field5

    insert into products_attributes (field1,field2,field3,field4, field5) values ('1','2','3','4','+')

    (to skip the autoincrement ID)


  •  

    Posting Permissions

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