|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Storing Data in Table
just wondering how can i store all this information on a table ??
should i create two table or i should just use one table ?? I thinking of using one table just to store personal information info table id name age phone 1 alex 15 544545 2 rob 20 854545 3 pretty 30 5454645 fruit table id info_id fruit 1 1 apple 2 1 pineapple 3 1 watermelon 4 2 apple 5 2 watermelon 6 2 orange 7 3 orange 8 3 watermelon 9 3 pineapple name :alex age : 15 phone : 544545 favourite fruit : apple, pineapple, watermelon name : rob age : 20 phone : 854545 favourite fruit : apple, watermelon, orange name : pretty age : 30 phone : 5454645 favourite fruit : orange, watermelon, pineapple. am i on the right track ??? |
|
#2
|
||||
|
||||
|
Yes, you are certainly on the right track. However, I'd suggest using THREE tables:
people: id, name and phone fruit: id and name favourites, people_id and fruit_id. Good luck, if you need any more help, just say it.
__________________
This is my code. Is it not nifty? "The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools." ---Douglas Adams Join the Itsacon fanclub! Zero Tolerance: Spammers banned so far: 264
![]() |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > Storing Data in Table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|