• Hi

    I am new to php and SQL and have recently started trying to use it and implement scripts onto my websites, all have being successfull with some fiddling, but I am totally stumped with this one. I need to execute a .sql file in MyPHP Admin to to create the correct tables in the database. But I keep receiving 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 ‘id int(255) NOT NULL auto_increment,
    url varchar(255) NOT NULL default '',
    ' at line 2 "

    The table in question is:
    SQL query:

    -- phpMyAdmin SQL Dump
    -- version 2.6.0-pl3
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Jul 10, 2005 at 02:00 PM
    -- Server version: 4.0.22
    -- PHP Version: 4.3.9
    --
    -- Database: royascom_asb
    --
    -- --------------------------------------------------------
    --
    -- Table structure for table
    asb_articles
    --
    DROP TABLE IF EXISTS
    asb_articles ;

    CREATE TABLE asb_articles (
    id int( 255 ) NOT NULL AUTO_INCREMENT ,
    url varchar( 255 ) NOT NULL default '',
    title longtext NOT NULL ,
    author varchar( 200 ) NOT NULL default '',
    article longtext NOT NULL ,
    resource_box longtext NOT NULL ,
    category varchar( 255 ) NOT NULL default '',
    PRIMARY KEY (
    id ) ,
    UNIQUE KEY
    url ( url ) ,
    FULLTEXT KEY
    article ( article` )
    ) TYPE = MYISAM

    Any help would be greatly appreciated as I am a total newbie to this stuff …

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Is this something you’re trying to add into wp?

    Thread Starter marvellousmarx

    (@marvellousmarx)

    Yea, is it in wrong place ?

    This is fine…. I was just wondering if this was an addin since it seems to be a separate database not just a separate set of tables in the wp database.

    Thread Starter marvellousmarx

    (@marvellousmarx)

    Yes it is a complete database, I had to set up a SQL database in my cpanel and execute a SQL file called database.sql in MyPHPAdmin, which would import the required tables into my new database, so the script could then add content. When I add the .sql file it comes up with the above error, sorry if I dont explain well as I am a noobie to all this

    Thanks for the help

    I honestly don’t know a whole lot about that sort of thing. It looks okay to me, what you posted there, though there seems to be a “backtick” in ( article` ) that doesn’t belong (unless that happened when you copy n pasted into the post field)….

    I would suggest that the main site for phpmyadmin is your best place for information.

    “FULLTEXT KEY article ( article` )”
    There, you seem to have an extra backstick.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Death By phpMyAdmin SQL Dump’ is closed to new replies.