in reply to Chat script + mysql

One table for each "set" of information. So you have a set of banned IP's, thats a table, a set of swear words (a table), and a set of reserved names. A set of login credintials and a set of messages. Looks like 5 tables to me.

Update: I looks like your reserved names are actualy the set of users with passwords. So maybe those two sets are actualy one, if you want to use a reserved name you have to know the password that goes with it. I thought maybe you had a set of reserved but not used names. Even in that case they could simply be logins that no one knows the password to. ;)


___________
Eric Hodges

Replies are listed 'Best First'.
Re^2: Chat script + mysql
by coldfingertips (Pilgrim) on Feb 17, 2005 at 18:25 UTC
    I should better explain that.

    The admin logs in with their username or password to administer the chat (delete bad messages, ban users, add swear words to the filter).

    Any admin as long as they have their cookie (user:pass authenticated) can use any RESERVED name they want. So the admin logs in, gets a cookie and gets to use the reserved names if they want along with other administrative duties.

      Looks like I misunderstood twice. Either way you should be able to better figure out which tables you need. In general you should have a table for each distinct set of data you have. Sometimes figureing out what constitutes a set can be difficult. In those cases think about the information and what will make it most accessible. You can cram data into all sorts of contorted forms so look for one that will be easy to work with now AND expand latter. Best of luck.


      ___________
      Eric Hodges