Alright, I have a directory with about 500 .swf files. What would be the best say to give every file, without the file extension, a record in a table with each filename as a column value? I'd rather not do this all manually... Thanks
Use something like excel and paste the values in a column (Col A). Then, use a formula to generate your rows of insert statements in column (Col B) include comma separation. Forumla e.g. =CONCATENATE("(", A1, ")", ",") You can extend for additional columns. =CONCATENATE("(", A1, ",", B1, ")", ",") Fill down as for as you have rows to insert. Copy and paste the resultant sql into phpMyAdmin and execute.
Use the following command to generate a list of SWF files. ls *.swf > list.csv Code (markup): Then use the IMPORT tab of phpMyAdmin to import it. Select CSV for the format of the file. The default options should work. Once they're imported, use the following SQL statement to trim the extension from the end of each row all in one go, assuming your column name is "filename". UPDATE table SET filename = REPLACE(filename, '.swf', ''); Code (markup):