sir pannels
01-07-2003, 12:40 PM
hey.. ok i need some help.. not coding.... but how i would go about using the DB.
ok so i have some tables in the db.... one of them is user with al the users details in and some other ones with info that ties to them.. anyway what i need to add is some way to store "something that a user has"
for example "food".. i want to store all the different types of food with a description of each in a table for each user. so i can call it like
select * from table_name where id=$id
etc.... so whats the best way to do this... i was gona have just a table food and inwhich have 3 fields.. id, name, description .. but then you can only add one food to each user/id.
so is the only other way to have a entire table for each users food? if this is then what sorta load on the server if i had that.. is there a better way?
thanks
bit scetchy - hope it makes sense
cheers :)
P
ok so i have some tables in the db.... one of them is user with al the users details in and some other ones with info that ties to them.. anyway what i need to add is some way to store "something that a user has"
for example "food".. i want to store all the different types of food with a description of each in a table for each user. so i can call it like
select * from table_name where id=$id
etc.... so whats the best way to do this... i was gona have just a table food and inwhich have 3 fields.. id, name, description .. but then you can only add one food to each user/id.
so is the only other way to have a entire table for each users food? if this is then what sorta load on the server if i had that.. is there a better way?
thanks
bit scetchy - hope it makes sense
cheers :)
P