What I want to do is to import a text file into a mysql db. What I mean is that instead inputing the whole text directly into the db I want to input the name of the file and then when I call it from the script to show me the contents of the file instead of its name. I understand that this is possible, but could someone please help me?
So you want the file's contents returned when you perform a query.. in that query? The only way it could work is having the database create a temporary table to store off the content just before returning... but that's a pointless waste of memory and speed. It should be faster and easier to just load the file's contents immediately following the query once you know the filename.
What I mean anyway, is that I want to just load the valu of the file into the database just by inserting its file name and without having to type the whole content...I dont know if am getting understood...
if you want the file line by line, if that would be easier, you could use file() but that returns the file in an array, so the code could get a little beefy and i dont like arrays that much
I think he just wants the contents of file loaded into db. just that.
i suggest you install phpMyAdmin and use the option for loading test files
into db