[SC.LUG] More MySQL (than you'd care to shake a stick at)!

nev nev at digital-thought.net
Tue Aug 17 10:01:08 BST 2004


hiya

i dont know how you are formatting your sql text file, but it should be along
the lines of the following table. this is one i actually used, so i know it works.

#
# Table structure for table `certs`
#

CREATE TABLE certs (
  certid bigint(6) NOT NULL auto_increment,
  userid varchar(16) NOT NULL default '',
  userpdf varchar(64) NOT NULL default '',
  PRIMARY KEY  (certid,userid,userpdf)
) TYPE=MyISAM;

#
# Dumping data for table `certs`
#

INSERT INTO certs VALUES (32, '38', '0207001.pdf');
INSERT INTO certs VALUES (41, '22', '0206130.pdf');
INSERT INTO certs VALUES (42, '22', '0206129.pdf');

========

you dont have to have 'create' and insert in the same document though, obviously.

hope this helps :)

nev


On Sun, 15 Aug 2004 21:23:06 +0100, Simeon Farrington wrote
> Hi Nev
> 
>  > Message: 6
>  > Date: Sat, 14 Aug 2004 21:47:52 +0100
>  > From: "nev" <nev at digital-thought.net>
>  >
>  > hassle me if theres anythin else i can help with :)
>  >
>  > nev
> 
> Here's one which I'm sure you you'll find no problem, but it's the 
> problem I have with Plus.Net's phpMyAdmin, which I've replicated.
> 
> What I'm trying to do (if you remember) is to get a table of data 
> into a mySQL database. I can do this successfully on the command 
> line using the syntax:
> 
> mysql> LOAD DATA LOCAL INFILE 'e:\Dove.txt' INTO TABLE dove FIELDS 
> TERMINATED BY ',' ENCLOSED BY '"';
> 
> However, when I have tried to get the same thing to work using the 
> phpMyAdmin wizard (which is my only choice at Plus.Net I get an error:
> 
> "Error
> 
> SQL-query :
> 
> LOAD DATA LOCAL INFILE 'C:\\WINDOWS\\TEMP\\php23.tmp' INTO TABLE 
> `dove` FIELDS TERMINATED BY ',' ENCLOSED BY '"'
> 
> MySQL said:
> #1148 - The used command is not allowed with this MySQL version"
> 
> Any ideas how I get this to work? This is the same input file in 
> both cases.
> 
> Thanks
> 
> Simeon
> 
> _______________________________________________
> SC mailing list
> SC at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/sc







More information about the SC mailing list