I am new and get error when insert table

Discussion in 'MySQL' started by Mitchell, Jun 29, 2009.

  1. #1
    I am trying to create a data base that holds just one item. A paragraph of html. To make it simple I have reduced that paragraph to a 3 letter word.

    I created a data base in phpmyadmin then created an sql. file with this info. and tried to import it into my data base. The MySQL manual offers no meaningful information regarding this error code. Can anyone give me some guidance, thanks.

    CREATE TABLE IF NOT EXISTS `xhtml_table` (
    `xhtml_field` blob NOT NULL );


    INSERT INTO `xhtml_table` (`xhtml_field`) VALUES
    (xfg);


    I get this error.

    Error

    SQL query:

    INSERT INTO `xhtml_table` ( `xhtml_field` )
    VALUES (
    xfg
    );

    MySQL said: Documentation
    #1054 - Unknown column 'xfg' in 'field list'
     
    Mitchell, Jun 29, 2009 IP
  2. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #2
    you need simple / single quotes for values
    do this one

    INSERT INTO `xhtml_table` (`xhtml_field`) VALUES
    ('xfg');
     
    crivion, Jun 30, 2009 IP
  3. Mitchell

    Mitchell Peon

    Messages:
    204
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It worked. I thank you so much Crivion. Now I can go to bed and actually fall asleep.
     
    Mitchell, Jun 30, 2009 IP