keldorn Posted December 20, 2009 Share Posted December 20, 2009 I'm building an application, I wanted to add the ability of the user to favorite stuff. What is good way to go about storing the favorite data? I'm thinking here, making a table for each user is not a good idea, I really trying think how sites like Youtube do this without scaling issues, would you save all their favorites in an Array and serialize it in the 1 row along with their username? Then when you need just unserislize and it and iterate over it, Is that how places like Youtube does it? or create 1 big table dump for all favorite of everybody and just have it sorted from userid=>user recursion? Like id + user_id + favorite_id THen just do SELECT favorite_id FROM favorites where user_id=$userid Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.