jonniejoejonson Posted September 1, 2008 Share Posted September 1, 2008 If i am creating a social network, where a users profile can be set to private. Would you a/ have a query on every profile page that checks to see if profile is set to private, and if it is, see if the user trying to view the page are friends... or would you b/ have the same query as above... but if it passes or fails set a session to say that you don't need to check for that user again. Am i saving a lot of time, by cutting down the number of queries my database has to do... or am i just wasting my time? reagards to any responders. Link to comment https://forums.phpfreaks.com/topic/122205-to-session-or-query/ Share on other sites More sharing options...
Fadion Posted September 1, 2008 Share Posted September 1, 2008 As i don't see a problem using the session, I would go for it. In the other hand, if the database is normalized and you are doing queries in the "smart" way, you shouldn't care much about a couple of extra ones. Link to comment https://forums.phpfreaks.com/topic/122205-to-session-or-query/#findComment-630921 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.