Re: Text from file into database
| From: | Daniel Schierbeck | Date: | Sun, 22 Aug 2004 15:24:01 +0000 |
| Subject: | Re: Text from file into database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194424@lists.php.net to get a copy of this message | ||
Phpu wrote:
Hi, I have a file, test.txt. The containig of this file is: line 1 line 2 line 3 ------ and so on I want to create a script that will read each line of the file and insert it to database. I am new to php and maybe you could help me Thanks I depends on what kind of database you wish to use (you probably have MySQL, though PostgreSQL would be preferable). If you have a large amount of lines I recommend you use prepared statements. But first of all, tell us which database you're going to use.Cheers, Daniel