last_insert_id and mysql_insert_id
#4

1. Add field to users table, called banID, with NULL allowed values
2. Create table bans
3. Create relation between banID in users table, with id in bans table
4. Store all bans history in bans table, but keep only most recent in banID field for specific user (or NULL if user isn't banned)
5. You can also add userID field in bans table, with relation to users.id field, so your bans history track can be more useful
Reply


Messages In This Thread
last_insert_id and mysql_insert_id - by Zex Tan - 17.08.2013, 14:32
Re: last_insert_id and mysql_insert_id - by Misiur - 17.08.2013, 14:43
Re: last_insert_id and mysql_insert_id - by Zex Tan - 17.08.2013, 14:49
Re: last_insert_id and mysql_insert_id - by Misiur - 17.08.2013, 15:02

Forum Jump:


Users browsing this thread: 1 Guest(s)