[PHP-DB] CSV to MyDB

2011-02-25 Thread Karl DeSaulniers
Hello everyone, Hope your day is going well. I have a (hopefully) quick question. What is the best way to store a CSV file in a MySQL database? As a varchar, blob, longtext or other? I would like to minimize the amount of fields in the table, so I was leaning towards a longtext or blob. But I

Re: [PHP-DB] CSV to MyDB

2011-02-25 Thread Adriano Rodrigo Guerreiro Laranjeira
Hey friend! You can create a DB table with the same structure of your CSV and store it like a normal table, using the mysqlimport command: http://dev.mysql.com/doc/refman/5.5/en/mysqlimport.html In this way, you can do SELECT's and all DML commands. If you want to store the file as you

Re: [PHP-DB] CSV to MyDB

2011-02-25 Thread Karl DeSaulniers
I see. Thank you for that and thank you for the link. Best, Karl Sent from losPhone On Feb 25, 2011, at 10:57 AM, Adriano Rodrigo Guerreiro Laranjeira adri...@argl.eng.br wrote: Hey friend! You can create a DB table with the same structure of your CSV and store it like a normal table,