I have text(1.txt) file as follow,I can easily insert this text file using phpmyadmin , Fields terminated by: @ and Lines terminated by:"|". Column names:"volume,book,number,text" It then insert into these four fileds.
You can see there is a line brake at the last fields(text)
1 @ 2 @ Number 7:
@ NarratedIbn 'Umar:
1. some text here.
2. tesging.
3.phpbuilder .
4. [url]www.phpbuilder.com[/url]
5. hehehe.
|
How can i change text field that detect where space and line brake...I mean "nl2br". so after inserting data into field text field will have this
<br>
Narrted some one said :
<br>
1. some text here.
<br>
2. tesging.
<br>
3.phpbuilder .
<br><br>
4. [url]www.phpbuilder.com[/url]
<br>
5. hehehe.
Can anyone make this code smiple to use in php
LOAD DATA LOCAL INFILE 'C:\\WINDOWS\\php196.tmp' INTO TABLE `hadith` FIELDS TERMINATED BY '@' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '|' (`volume`, `book`, `number`, `hadith`)
thanks