On Sat, 2010-09-25 at 12:08 +0300, Vlad Dragu wrote: > SELECT `site_tree`.`id` AS `site_tree_id`, `sites`.`site` AS > `site`,`sites`.`date_added` AS `date_added`, `users`.`nickname` AS > `nickname` FROM site_tree INNER JOIN sites ON site_tree.site_id = > sites.id > INNER JOIN game_sessions ON site_tree.session_id = > game_sessions.session_id > INNER JOIN users ON game_sessions.user_id = users.id ORDER BY > users.nickname
Ah, thanks! I didn't saw you were referencing the game_sessions.session_id instead of the game_sessions.id. > [Vlad] it felt more convenient not to add anon users to the database. > I would have had to change the login function and add an extra flag to > not check anon users. Also, the registration would have changed, no > more inserting a user, just updating the anon user and extra > conditions to see which users we have to update exactly. I understand - however it complicates a bit the access to some of data. For example, it forces you to have the hack and scan points in the game session, where they clearly don't belong, instead of having them as a user attribute. Or to add an extra step on queries that need to link for example a site info to the user info, like the query above (who need to go through the game_session table). What do you think of trying the same approach as the one you're currently having with the classes? (ie, coming up with an optimized UML schema) Since you'll be changing the structure of objects & implementing the dataobjects, it could be helpful to do this now rather than later, no? Xavier. _______________________________________________ Hackit Bar mailing list - [email protected] Wiki: http://community.hackit.cx/ List: http://community.hackit.cx/ml/ Forum: http://community.hackit.cx/forum/ Ideas: http://community.hackit.cx/ideas/ IRC: irc://irc.freenode.net/#politis
