· Martin's Expiry Checker v3 Blog ·

M.E.Bush > Misc. > Expiry Checker v3 Blog > 17-Aug-2006

Preparing the MySQL database

I logged in to MySQL and tried to create the three blank tables: expirydata-live, expirydata-temp and expirydata-lastweek. It wouldn't let me - presumably because it interpreted the hyphens as minus signs - but it did let me create expirydataLIVE, expirydataTEMP and expirydataLASTWEEK. I created these tables by duplicating the expirycheckertable that I had created previously, using three separate commands like this...
CREATE TABLE expirydataLIVE SELECT * FROM expirycheckertable;
...which I found here. I then deleted the expirycheckertable, and confirmed that I now had just the three tables I needed:
mysql> DROP TABLE expirycheckertable;
Query OK, 0 rows affected (0.03 sec)
                     
mysql> SHOW TABLES;
+--------------------+
| Tables_in_bushm    |
+--------------------+
| expirydataLASTWEEK |
| expirydataLIVE     |
| expirydataTEMP     |
+--------------------+
3 rows in set (0.00 sec)

mysql>