All pastes #34483 Raw Edit

Stuff

public text v1 · immutable
#34483 ·published 2005-12-21 15:36 UTC
rendered paste body
The events table has all the events listed, and usernames associated with them, depending on who inputted them.
mysql> describe events;
+--------------+--------------------------------+------+-----+---------------------+----------------+
| Field        | Type                           | Null | Key | Default             | Extra          |
+--------------+--------------------------------+------+-----+---------------------+----------------+
| id           | mediumint(9) unsigned zerofill |      | PRI | NULL                | auto_increment |
| username     | varchar(20)                    | YES  |     | NULL                |                |
| start        | datetime                       |      |     | 0000-00-00 00:00:00 |                |
| end          | datetime                       |      |     | 0000-00-00 00:00:00 |                |
| title        | varchar(100)                   | YES  |     | NULL                |                |
| location     | varchar(100)                   | YES  |     | NULL                |                |
| body         | mediumtext                     | YES  |     | NULL                |                |
| contactname  | varchar(60)                    | YES  |     | NULL                |                |
| contactnum   | varchar(20)                    | YES  |     | NULL                |                |
| contactemail | varchar(60)                    | YES  |     | NULL                |                |
| contactwww   | varchar(100)                   | YES  |     | NULL                |                |
| pending      | char(1)                        | YES  |     | NULL                |                |
| image        | varchar(20)                    | YES  |     | NULL                |                |
+--------------+--------------------------------+------+-----+---------------------+----------------+

The users field distinguishes the info for the user pulling events, so they will pull events associated with their own username but they also need to pull events associated with the usernames listed in the 'feeds' field.
mysql> describe users;
+----------+--------------+------+-----+---------+-------+
| Field    | Type         | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+-------+
| username | varchar(20)  |      | PRI |         |       |
| password | varchar(20)  |      |     |         |       |
| email    | varchar(60)  | YES  |     | NULL    |       |
| feeds    | varchar(200) | YES  |     | NULL    |       |
| edit     | varchar(200) | YES  |     | NULL    |       |
+----------+--------------+------+-----+---------+-------+