Results 1 to 5 of 5

Thread: help

  1. #1

    Thread Starter
    Hyperactive Member scsa20's Avatar
    Join Date
    Apr 2001
    Location
    Mars
    Posts
    456

    help

    yeah, does anyone knows that the following means??

    Database error in WoltLab Burning Board: Invalid SQL: INSERT INTO bb1_boards VALUES ('','0','test','','test','0','0','0','0','1','0','0','')
    mysql error: Column count doesn't match value count at row 1
    mysql error number: 1136
    Date: 19.01.2002 @ 01:50
    Script: /admin/admin.php
    Referer: http://sforums.coolfreepages.com/adm...d8da77ea3abcc9

    There seems to be some technical problems with the database at this moment.
    Please use the reload-button of your browser to try again.
    If these problems continue, please contact the Admin of this Forum.
    how do I fix this, I only get it when trying to make a forum for my board


    p|-|34|2 /\/\3 f0|2 | $p34k 1337
    My TSS quote of the day: "If your haveing a bad day, just press the restart button."

  2. #2
    Fanatic Member riis's Avatar
    Join Date
    Nov 2001
    Posts
    551
    I think your SQL syntax is wrong. You forgot to use column names.
    Since you used 13 values, you should also insert 13 column names.
    Syntax = INSERT INTO bb1_boards (col_name1, col_name2, ..., col_name13) VALUES (your comma-separated list of values).

  3. #3

    Thread Starter
    Hyperactive Member scsa20's Avatar
    Join Date
    Apr 2001
    Location
    Mars
    Posts
    456
    I had it like that (('','0','test','','test','0','0','0','0','1','0','0','')) before with no errors but now it does


    p|-|34|2 /\/\3 f0|2 | $p34k 1337
    My TSS quote of the day: "If your haveing a bad day, just press the restart button."

  4. #4
    Addicted Member
    Join Date
    Nov 2001
    Location
    Yewston, Texis
    Posts
    240
    It's dangerous to say:

    INSERT INTO bb1_boards VALUES ('','0','test','','test','0','0','0','0','1','0','0','')

    Because sometimes it works and sometimes it doesn't work. It might work today, but if you add or remove a column from the database, it will stop working. If you use the more complete syntax, your inserts wont break suddenly when you change the database.

    The preferred syntax is:
    INSERT INTO bb1_boards field1, field2, field3...field13 VALUES
    ('','0','test','','test','0','0','0','0','1','0','0','')

    cudabean

  5. #5
    Addicted Member
    Join Date
    Nov 2001
    Location
    Yewston, Texis
    Posts
    240
    Oops, I think I forgot some required parenthesis:
    INSERT INTO bb1_boards (field1, field2, field3...field13) VALUES
    ('','0','test','','test','0','0','0','0','1','0','0','')

    cudabean

Posting Permissions

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



Click Here to Expand Forum to Full Width