40 users online (0 members and 40 guests)  


  Results 1 to 2 of 2

Related

  1. create table in mysql from php forms    Forum: PHP Forum
    Replies: 2
  2. To create table in photoshop    Forum: CSS Forum
    Replies: 3
  3. Replies: 0
  4. create a table along the width of the sheet    Forum: General Discussion
    Replies: 1
  5. This is about a create database table?    Forum: PHP Forum
    Replies: 1
  1. #1
    ramki067's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    22

    Is there anything wrong with my create table statement?

    Hi guys,
    I have an sql query which mysql is giving error:
    Code:
    CREATE TABLE '42011-10-04 08:10:37'(`id` INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(`id`),`url_string` VARCHAR(100),`loadtime` float(10),`comment` VARCHAR(160),`urlflag` INT NOT NULL DEFAULT '0')
    Is there anything wrong with query, its giving the error as below:
    Code:
    ERROR 1064 (42000): 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 ''
    42011-10-04 08:10:37'(`id` INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(`id`),`url_'
    at line 1
    Please help.

    Regards,
    Ramki

  2. #2
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: Is there anything wrong with my create table statement?

    Please use this:
    PHP Code:
    CREATE TABLE `42011-10-04 08:10:37` (`idINT(10NOT NULL AUTO_INCREMENT,
    `
    url_stringVARCHAR(100),
    `
    loadtimefloat(10),
    `
    commentVARCHAR(160),
    `
    urlflagINT NOT NULL DEFAULT '0',
    PRIMARY KEY(`id`), KEY `id` (`id`)); 
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.