Add Quotes

The purpose of this program is to load quotes from a file into a table called "quotes". It is intended to be run by the administrator. If the table already has entries, it will add to the rows. The program expects that a database and table (quotes) have previously been created in mysql (use create_quotes.sql in batch mode as described below).

The program expects only a quote and an author. The only requirement is to ensure that the author is on a separate line. The first position of that line must have a tab (ASC 9).

Create 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.

img: command prompt display