This program (bktxt2table.php) will transfer the contents of a text file (created by quotes2txt.php and edited by hand) to the table "quotes".
All the entries in the text file will be ADDED to the table. So, if your goal is to recreate the table and start from scratch, make sure you issue the commands necessary to delete and re-create the table BEFORE running. See Create TableWhile it is possible to re-create the table, you can also simply add quotes to the table using this program.
Each of the entries in the text file will have, at minimum, a quote designated by "Q:" and an author designated by "A:". The identification code should always be in the first columns of the item. The identification codes are:
Prior to running this, it would behoove the admin to make a copy of the current table, just incase something goes wrong. This can be accomplished by going to the command line and executing the following sql commands to create a table (prev) and then copy quotes to the new table.
To create the database and table, use the batch file create_quotes.sql which is provided. On a command line, startup mysql and enter: "source batch-filename; " (without the quotes). Since the batchfile is called create_quotes.sql then you would enter source create_quotes.sql; (shown below).
If you are going to redo the table, remember to run create_quotes.sql from the command line first. Else, running this program will add rows to the table.