Hello Friends, I'm currently working on the most challenging project of my life and this is daunting being that am not an expert in PHP/MYSQL. 1. The website is user-generated product site where users upload product ,review products and share with friends.so is it better i store the product image in the database after resizing with my php code? 2. how do i design my database tables to handle user with their friend list just like is done in social networking websites like http://www.kaboodle.com so that when a user login on its profile ,it would be possible to see the friends of that user i have loaded a screenshot to help you understanding what am trying to say thank you cheers
Hi, 1. I think it's a good idea to resize the image before storing it as it will take less space in database. 2. I think you should have a table profile and a table friend. the table "profile" will have the details of the person. The table friend will have the id of the profile, and the id of the profile of his friend. Hope this help
what of if the person has more than one friend,does that mean in the table profile ,am going to store more than one friendID in one table column or would i have more than one column for friendID?
You will have to create a new table, let say "friends" wich will have 2 columns Profile id : the id of the profile (foreign key to the profile table) Friend id : The profile id of the friend (also a foreign key to the profile table) Ex : Profile id | Friend id 1 2 1 3 1 7 In this example the profile 1 is friend with 2,3 and 7.< Hope this help!