Security issues with LOAD DATA

2002-12-02 Thread Chris Williams
I developed a PHP application where users can update a mySQL table using
LOAD DATA. Recently I installed this application on another web server where
the File Permissions have been set such that this method of uploading data
is no longer valid. Since phpMyAdmin is not an option I am trying to find an
alternative or workaround such that users can upload a comma delimited text
file containing the table records.

Any suggestions will be appreciated.
Christopher Williams


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Multiple Field Terminators in LOAD??

2002-01-27 Thread Chris Williams

I’m trying to create a LOAD statement that will enable me to load both a
comma or tab delimited text file. I am only successful in achieving one or
the other by using:
 LOAD DATA LOCAL INFILE mfile.txt INTO TABLE Temp FIELDS TERMINATED BY
'\\t,' LINES TERMINATED BY '\\r\\n'
or
LOAD DATA LOCAL INFILE mfile.txt INTO TABLE Temp FIELDS TERMINATED BY ','
LINES TERMINATED BY '\\r\\n'

I don’t know however the proper syntax to include both field termination
parameters in one LOAD statement like I am able to do with line termination.

Regards,
Chris Williams


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Setting a DEFAULT value

2001-11-04 Thread Chris Williams

I'm trying to create at table that inserts a default value into a field if
nothing is supplied. If in interpret the documentation correctly this should
be accomplished by something like this:

CREATE TABLE Location (LocationID VARCHAR(10) NOT NULL PRIMARY KEY, Name
VARCHAR(50),  Address1 VARCHAR(50), Address2 VARCHAR(50), City VARCHAR(50),
State VARCHAR(50), Zip VARCHAR(10), Phone VARCHAR(20), Email VARCHAR(50),
URL VARCHAR(75) , Icon INT DEFAULT 1)

Where the Icon field will get set to 1 if no value is supplied upon insert.

When I insert a row such as:
INSERT INTO LocationTEMP VALUES (100,1,2,3,4,5,6,7,8,9,'')

zero (0) gets inserted in the Icon field.

It appears DEFAULT doesn't work.

Thanks,
Chris Williams


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php