The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SQL Syntax help

Discussion in 'Database Discussions' started by distinctedge, Jul 14, 2008.

  1. distinctedge

    distinctedge Registered

    Joined:
    Jul 5, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Attempted table:

    CREATE TABLE `displayid` (
    `id` int(11) NOT NULL auto_increment,
    `title` text,
    `keyword` text,
    `scode` longtext,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 7168 kB';

    ******************************************
    Return from Cpanel SQL
    SQL query:

    CREATE TABLE `displayid` (
    `id` int( 11 ) NOT NULL AUTO_INCREMENT ,
    `title` text,
    `keyword` text,
    `scode` longtext,
    PRIMARY KEY ( `id` )
    ) ENGINE = InnoDB DEFAULT CHARSET = latin1 COMMENT = 'InnoDB free: 7168 kB'

    MySQL said: Documentation
    #1064 - You have an error in your SQL syntax. Check the manual that corresponds

    to your MySQL server version for the right syntax to use near 'DEFAULT

    CHARSET=latin1 COMMENT='InnoDB free: 7168 kB'' at line


    What to do?

    Thanks in Advance,

    Mike
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
  3. distinctedge

    distinctedge Registered

    Joined:
    Jul 5, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Why not just create it in phpMyAdmin?
     
  5. distinctedge

    distinctedge Registered

    Joined:
    Jul 5, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi David,

    That is the attempted script install point. Try to see this from a newbie sight of view. I am simply trying to make a piece of software work by following instructions. In this case the code for the table is not working for this Cpanel set up. :

    #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 7168 kB'' at line

    So I am searching for a way to make my syntax work. I assume I must change the code a bit. But what?

    Someone please help.

    Mike
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Your choices are:

    1. Contact the script developer for assistance (usually the best thing to do)
    2. Read the SQL code and use phpMyAdmin to generate the same table
    3. Learn SQL, read the MySQL manual and adjust the code accordingly

    This is not a cPanel-specific issue.
     
  7. distinctedge

    distinctedge Registered

    Joined:
    Jul 5, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    OK Thanks,

    Mike
     
Loading...

Share This Page