SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,582
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    insert statement

    I cant figure out the problem with my importstatement, whennn I try to use phpmyadin, it com,plains and i cant figure out why
    CREATE TABLE IF NOT EXISTS `providers` (
    `id` smallint unsigned NOT NULL auto_increment,
    `name` varchar(50) NOT NULL default '',
    `city` varchar(50) NOT NULL default '',
    `phone` varchar(25) NOT NULL default '',
    `email` varchar(75) NOT NULL default '',
    `website` varchar(100) NOT NULL default '',
    `gender` tinyint NOT NULL,
    `age` tinyint NOT NULL,
    `contactmethod` tinyint NOT NULL,
    `type` tinyint NOT NULL,
    `haircolor` tinyint NOT NULL,
    `hairlength` tinyint NOT NULL,
    `height` tinyint NOT NULL,
    `bustsize` tinyint NOT NULL,
    `build` tinyint NOT NULL,
    `looks` tinyint NOT NULL,
    `incall` tinyint NOT NULL,
    `outcall` tinyint NOT NULL,
    `smokes` tinyint NOT NULL,
    `ethnicity` varchar(100) NOT NULL default '',
    `greeting` varchar(500) NOT NULL default '',
    `photos1` varchar(255) NOT NULL default '',
    `photos2` varchar(255) NOT NULL default '',
    `photos3` varchar(255) NOT NULL default '',
    `photos4` varchar(255) NOT NULL default '',
    `photos5` varchar(255) NOT NULL default '',
    PRIMARY KEY (`id`)
    )

    INSERT INTO `providers` VALUES
    (38, 'Sandra J.', 'Manchester', '+4400000000', '', 'http://www.myjum.com', 1, 15, 1, 2, 1, 3, 34, 2, 3, 4, 1, 0, 1, 'indian', 'Hello...', 'Frangipani Flowers.jpg', '', '', '', ''),

    I can create the table fine, but the insets statement throws an error
    "Oh, and Jenkins--apparently your mother died this morning."

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,412
    Mentioned
    149 Post(s)
    Tagged
    4 Thread(s)
    What error?

  3. #3
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,582
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    #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 'INSERT INTO `providers` VALUES (38, 'Sandra J.', 'Manchester', '+4400000000', ''' at line 31

    I dont see an error in the syntax though
    "Oh, and Jenkins--apparently your mother died this morning."

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,022
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    you're missing the mandatory semicolon which separates sql statements
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,582
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    oh, thx
    "Oh, and Jenkins--apparently your mother died this morning."


Bookmarks

Posting Permissions

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