Re: [PHP-DB] [Newbie Q] csv file upload via php to mysql tutoria
> Is Load-Data possible in mssql? I'm unsure but the original poster was asking about mysql. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] [Newbie Q] csv file upload via php to mysql tutoria
Is Load-Data possible in mssql? -Original Message- From: Chris Boget [mailto:chris@;wild.net] Sent: Thursday, November 07, 2002 2:48 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: kristina; [EMAIL PROTECTED] Subject: Re: [PHP-DB] [Newbie Q] csv file upload via php to mysql tutoria > Basically, you would have to receive a CSV data to then pass it to the > mysql via command prompt, just as if you would do it via shell. You > should be using mysqlimport in shell. So, in PHP you'd get to use system > command to accomplish this all automatically. Be aware of some security > issues. Actually, you don't even need to do that. Since you are uploading the file via PHP, PHP has the relevant information regarding that file. Particularly, where it's located. Using that, you can just do a LOAD DATA INFILE query in mySQL. You can find more information about there here: http://www.mysql.com/doc/en/LOAD_DATA.html I'm doing exactly what you are - accepting a csv file as upload - and I'm using the above query command to get it into the DB. It's been working for me for the last 2 years. :p hth Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] [Newbie Q] csv file upload via php to mysql tutoria
> Basically, you would have to receive a CSV data to then pass it to the > mysql via command prompt, just as if you would do it via shell. You > should be using mysqlimport in shell. So, in PHP you'd get to use system > command to accomplish this all automatically. Be aware of some security > issues. Actually, you don't even need to do that. Since you are uploading the file via PHP, PHP has the relevant information regarding that file. Particularly, where it's located. Using that, you can just do a LOAD DATA INFILE query in mySQL. You can find more information about there here: http://www.mysql.com/doc/en/LOAD_DATA.html I'm doing exactly what you are - accepting a csv file as upload - and I'm using the above query command to get it into the DB. It's been working for me for the last 2 years. :p hth Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] [Newbie Q] csv file upload via php to mysql tutoria
Basically, you would have to receive a CSV data to then pass it to the mysql via command prompt, just as if you would do it via shell. You should be using mysqlimport in shell. So, in PHP you'd get to use system command to accomplish this all automatically. Be aware of some security issues. -- Maxim Maletsky [EMAIL PROTECTED] Ruprecht Helms <[EMAIL PROTECTED]> wrote... : > Hi kristina, > > >[...] I can see that phpMyAdmin does this, > > which is great but I > > need it for joe public to be able to > > use. so I don't > > want them using phpMyAdmin. > > If you can't use phpMyAdmin try to make it with SQL-Import or > a similar function. > > For mysql you have documentation under http://www.mysql.com in English > and http://www.mysql.de for German. > > Regards, > Ruprecht > > -- > Ruprecht Helms IT-Service und Softwareentwicklung > > Tel/Fax.: +49[0]7621 16 99 16 > Homepage: http://www.rheyn.de > email: [EMAIL PROTECTED] > -- > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] [Newbie Q] csv file upload via php to mysql tutoria
Hi kristina, >[...] I can see that phpMyAdmin does this, > which is great but I > need it for joe public to be able to > use. so I don't > want them using phpMyAdmin. If you can't use phpMyAdmin try to make it with SQL-Import or a similar function. For mysql you have documentation under http://www.mysql.com in English and http://www.mysql.de for German. Regards, Ruprecht -- Ruprecht Helms IT-Service und Softwareentwicklung Tel/Fax.: +49[0]7621 16 99 16 Homepage: http://www.rheyn.de email: [EMAIL PROTECTED] -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php