RE: file upload to MySql

2002-09-21 Thread John Almberg
You can do the upload with a form. Read any HTML reference and check out the tag. The web server will store the uploaded file as a temporary file. Your form handler will have to store it someplace permanent. This is pretty simple using the CGI module. Check out the CGI module documentation for co

Re: file upload to MySql ??

2002-09-21 Thread Mariusz
db) to my visitors... how can I accomplish that? do I have to upload their file first to the host and then to my db? thanks M - Original Message - From: "Priss" <[EMAIL PROTECTED]> To: "perl" <[EMAIL PROTECTED]> Sent: Saturday, September 21, 2002 3:02 AM Subject:

Re: file upload to MySql

2002-09-21 Thread Priss
Sorry, a bit messy... use DBI; $dbh = DBI->connect("DBI:mysql:database=mydatabase;host=localhost", "user", "password", {'RaiseError' => 1}); $sth = $dbh->prepare("LOAD DATA INFILE '/home/me/file' INTO TABLE mytable FIELDS TERMINATED BY '|'"); $sth->execute(); Priss --- Priss <[EMAIL PROTECTED

Re: file upload to MySql

2002-09-21 Thread Priss
You mean something like this? use DBI; $dbh = DBI->connect("DBI:mysql:database=mydatabase;host=localhost", "user", "password", {'RaiseError' => 1}); $sth = $dbh->prepare("LOAD DATA INFILE '/home/me/file' INTO TABLE mytable FIELDS TERMINATE D BY '|'"); $sth->execute(); Priss --- Mariusz <[EMA