SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2005
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face Help Me with PHPMyAdmin

    Hello,

    I imported an sql file to PHPMyAdmin to create a table. Here is the content of the file:

    Code:
    CREATE TABLE `match_accesscontrol` (  `id` int(11) NOT NULL auto_increment,  `friendlyname` varchar(250) NOT NULL default '',  `page` longtext NOT NULL,  `types` varchar(250) NOT NULL default '',  UNIQUE KEY `id` (`id`)) TYPE=MyISAM AUTO_INCREMENT=202 ;
    I got the error:

    Code:
    SQL query: 
    
    CREATE TABLE `match_accesscontrol` ( `id` int(11) NOT NULL auto_increment, `friendlyname` varchar(250) NOT NULL default '', `page` longtext NOT NULL, `types` varchar(250) NOT NULL default '', UNIQUE KEY `id` (`id`)) TYPE=MyISAM AUTO_INCREMENT=202 
    
    
    MySQL said:  
    
    #1064 - You have an error in your SQL syntax near 'CREATE TABLE `match_accesscontrol` (  `id` int(11) NOT NULL auto_increment,  ' at line 1
    Please help me resolve it. :'(

  2. #2
    SitePoint Evangelist djdykes's Avatar
    Join Date
    Feb 2005
    Location
    Chester, Cheshire
    Posts
    565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your Query worked fine for me - it created the table in my sql tests DB no probs...
    Code:
    CREATE TABLE `match_accesscontrol` (
    `id` int(11) NOT NULL auto_increment,
    `friendlyname` varchar(250) NOT NULL default '',
    `page` longtext NOT NULL,
    `types` varchar(250) NOT NULL default '',  UNIQUE KEY `id` (`id`)) TYPE=MyISAM AUTO_INCREMENT=202 ;
    maybe take out the TYPE=MyISAM AUTO_INCREMENT=202 bit????

  3. #3
    SitePoint Zealot
    Join Date
    Apr 2005
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the query is fine, but the system has a problem because it adds "" in front of data when reading from files. Please take a look a the error:

    Code:
    SQL query: 
    
    CREATE TABLE `match_accesscontrol` ( `id` int(11) NOT NULL auto_increment, `friendlyname` varchar(250) NOT NULL default '', `page` longtext NOT NULL, `types` varchar(250) NOT NULL default '', UNIQUE KEY `id` (`id`)) TYPE=MyISAM AUTO_INCREMENT=202 
    
    
    MySQL said:  
    
    #1064 - You have an error in your SQL syntax near 'CREATE TABLE `match_accesscontrol` (  `id` int(11) NOT NULL auto_increment,  ' at line 1


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
  •