Jump to content

Row Types


supanoob

Recommended Posts

well, anyway i want to be able to insert several things into one row.. like a list of items. now i dont know what type of field my items should go into. and i dont how i should update them. since a normal UPDATE script in php takes out whatever is in currently and replaces it with a new thing.

any help would be appreciated. thanks
Link to comment
Share on other sites

at the moment the field i want my items to go into is as follows,

field name: items
type: longtext
attributes: none
null: no
defaulth: none
extra: none

now, i was told that longtext would work for storing mulitple things in it. now what i want to do is put lets say 10 different things in it and when i echo it echo it as a list. but i dont know if all this is right or even possible and if so what would i need to put to add to the list of things in it?

would it be ADD to players blah='$blah' where user='$user' since i know update resets whatever your updating to its new value
Link to comment
Share on other sites

[!--quoteo(post=382542:date=Jun 11 2006, 12:20 PM:name=supanoob)--][div class=\'quotetop\']QUOTE(supanoob @ Jun 11 2006, 12:20 PM) [snapback]382542[/snapback][/div][div class=\'quotemain\'][!--quotec--]
yes but then how would i know what row to put each item into?
[/quote]
I don't know what you mean -- if you're adding/deleting a item, you know which row it is; same if you're updating it. Each row would simply have a link back to the base table.
Link to comment
Share on other sites

[!--quoteo(post=382561:date=Jun 11 2006, 12:38 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jun 11 2006, 12:38 PM) [snapback]382561[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I don't know what you mean -- if you're adding/deleting a item, you know which row it is; same if you're updating it. Each row would simply have a link back to the base table.
[/quote]


i got that part so what Type of row should it be? test, longtext?

maybe i should explain in a little more detail what i want to happen :S

ok so i want someone to be able to buy a weapon and an armour so they go to the shop. they buy the weapon (1 thing) its gets put into the item row (which at the moment is longtext) then they go to buy the armour and that takes over the weapon. but i dont want it too i want it to store both things in the row. then i want to be able to echo all the things in that row in a list like so.

Weapon
Armour
Weapon
Armour

i will even have 2 rows at one point splittin both things up.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.