Test.text
abc,def,ghi,jkl,...
Is there anyway possible to insert each one to each row in database?
1 abc
2 def
...
Any suggest?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I’m not wrong, you can do that with explode
The
$varvariable will be a array containing, in this case, 4 positions(0,1,2, 3) with this(‘abc’,’def’,’ghi’,’jkl’).No you can do a
foreachinserting the values on your table:Just complementing Breland answer, you could also do this directly with MySQL like this?
And if necessary, you can add this:
LINES STARTING BY 'xxx'to define from where the insert will begin. It is useful in case you want to avoid some lines on your file.