SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile #1064 - You have an error in your SQL syntax; check the manual that corresponds to yo

    Hi all
    I am trying to make 2 tables on my database rsvp i am using mysql version 5.5.16 our professor told us to use this scripts to create tables in our database and i am getting this error #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 '=MyISAM AUTO_INCREMENT=1' at line 12
    DROP TABLE IF EXISTS `rsvps`;
    CREATE TABLE IF NOT EXISTS `rsvps` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `firstname` varchar(255) NOT NULL,
    `lastname` varchar(255) NOT NULL,
    `phone` int(10) NOT NULL,
    `email` varchar(255) NOT NULL,
    `attending` varchar(255) NOT NULL,
    `guest` varchar(255) NOT NULL,
    `foodchoice` varchar(255) NOT NULL,
    `comments` varchar(255) NOT NULL,
    PRIMARY KEY (`id`)
    TYPE=MyISAM AUTO_INCREMENT=1 ;
    also i need table script for an upload image from my rsvp i know the one he gave us is wrong because just about every code he has given us is wrong lol i would appreciate any help you'll can give

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,021
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by edmanhickman View Post
    our professor told us to use this scripts
    your professor gave you code with errors in it

    first of all, you're missing the closing parenthesis for the list of columns

    this one --> CREATE TABLE tablename ( list of columns ) table attributes

    secondly, one of your table attributes is from an earlier version of mysql and will also give you an error
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


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
  •