|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Arrays and Mysql?
I am confused. When you fetch data from MySql is comes back as an array but i want to store mutiple fields as a array in a single mysql field. is this possibel What i am doing is making a shopping system and i don't want to have a seperate mysql fields for each item I want to store the whole cart contents in one mysql field. I hope I was clear Thank you in advance
-Hap Hayes |
|
#2
|
|||
|
|||
|
RE: Arrays and Mysql?
I suppose you could, it would be a single long string. Not only would this be grossly ineffcient, but this violates 1st Normal Form. http://databases.about.com/library/weekly/aa081901a.htm
Why do you want to combine all that info into a single field anyways? |
|
#3
|
|||
|
|||
|
RE: Arrays and Mysql?
I understand your point but consider on what kleigh has stated..
Yu can store the item ids in a string seperated by a delimeter.. eg: IT004|IT220|IT250 Also there is a data type in MySQL to do this kinda thing called SET.. You can follow this link for more on it.. http://www.mysql.com/doc/en/SET.html |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Arrays and Mysql? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|