03.05.2013, 07:15
I've recently been trying to find a way for players to decorate their house and the objects save to their house... problem is... i'm trying to figure out the best way to save it to MySQL... I planned to sell it in the 'House' table where the houses are all saved... I just don't know how I could come around it other than this idea which i'll explain now:
Make one column called 'Furniture' and every furniture that is placed in the house will be stored to that column, then if the server restarts loop through the index of furniture for that house and then add the furniture to the house then move onto the next one?
This is my only idea but seeing as I at least had one I thought i'd throw it out to you.. is that the best way to do it? Or does anyone have any better suggestions?
Make one column called 'Furniture' and every furniture that is placed in the house will be stored to that column, then if the server restarts loop through the index of furniture for that house and then add the furniture to the house then move onto the next one?
This is my only idea but seeing as I at least had one I thought i'd throw it out to you.. is that the best way to do it? Or does anyone have any better suggestions?