inserting a bulk list to mysql via php -
i have got text file. there names on every lines. here sample view:
. . . oakes oakley obadiah obelix oberon obert obiajulu . . .
i wanna insert them mysql using php. created table:
create table names ( id int(11) not null auto_increment, name int(11) default null, primary key (id) )
could please kindly suggest me function make job? thanks...
$strings = explode("\n", file_get_contents('your.txt'));
then loop on $strings generate query.
Comments
Post a Comment