can text (ascii) files be stored in a mysql db and how? thanks!
I think you have to made a text field;
create table x (id int(2),asciifile text);
test it, at me works.
in otherwords, i can put a text file with a .txt extension into a field of a mysql table so long as it is specified as data type TEXT? how do i do that in terms of SQL commands? thanks!!!
you read the file and assign to a variable
$filename="$file"; $fd = fopen ($filename, "r") or die ("Can't open file\n"); $contents = fread ($fd, filesize ($filename)); fclose ($fd);
then insert into TABLENAME values ($contents,.....)
is there now way to insert a file directly into a field??