SVC file to MySQL


#1

I need to upload data from SVC file to DB, well I asuume I need to use something like file() and then read each row…

Any Ideas?

Thanks!


#2

Don’t really know what SVC is, but if you are talking just plain text files… Then you can use the various file commands.

fopen()
fout()
fclose()
fread()
file()
etc…

If you go to php.net and search for file you will get info on that command and many of the supporting/related commands are on the left.

It should get you started.

Good luck.


#3

I’m talking about comma separeted files, saved as svc or txt or log


#4

They should be .csv, not .svc. Anyhow, look at fgetcsv() which will help you.


#5

depending on your desired method, you might also consider using the explode() function as well.

Thanks for the Clarification of SVC/CSV thing. I knew what CSV files were and suspected that might have been what you meant.

Good luck


#6

Thanks,
its working…
I hope I wont forget about this function…