Update / Query MySQL Swing Applet for COFFEES

This applets connects to the coffeebreak table (see: Sun's Java Tutorial)

You can enter SQL UPDATE expressions in the Update Field, e.g.:

  UPDATE COFFEES SET SALES = 75 WHERE COF_NAME LIKE 'Colombian'
  INSERT INTO COFFEES VALUES ('Home_Grown', 101, 17.99, 10, 0)

You can enter SQL QUERY expressions in the Query Field, e.g.:

  SELECT * FROM COFFEES
  SELECT * FROM COFFEES WHERE PRICE > 9
  SELECT PRICE, COF_NAME FROM COFFEES
  SELECT PRICE, COF_NAME FROM COFFEES WHERE PRICE > 9

Here is the table definition:

Database: COFFEEBREAK  Table: COFFEES  Rows: 12
+----------+-------------+------+-----+---------+-------+
| Field    | Type        | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| COF_NAME | varchar(32) |      | PRI |         |       |
| SUP_ID   | int(11)     | YES  |     |         |       |
| PRICE    | float(10,2) | YES  |     |         |       |
| SALES    | int(11)     | YES  |     |         |       |
| TOTAL    | int(11)     | YES  |     |         |       |
+----------+-------------+------+-----+---------+-------+

Source: MySqlQuerySwingApplet.java
D.K.S.