Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
herbster69
Newbie


Joined: 20 Nov 2009
Posts: 8

PostPosted: Fri Nov 20, 2009 7:58 pm   

Deleting database records
 
I'm trying to create a trigger that does the following:

1. Creates 3 variables from the trigger text (name (text), potion(text) & sips (number)) - DONE
2. Deletes the contents of a database (potionlist).
3. Create records (fields: name (text), potion (text) & sips (number) in the database (potionlist) with the output of the trigger - DONE
4. Update another database (potions) with the each unique potion with the least number of sips from the potionlist database.
5. Using the contents of the potions database, update each variable with the potion, using the variable field.

Database Information:

potionlist:

fields: name (text), potion(text) & sips (number)
Unique user fields: potion(text)
Data Example:

health|potion12345|43
health|potion12348|50
mana|potion34567|50
mana|potion32568|22

potions:

fields: variable_name (text), type (text), potion(text)
Unique user fields: All

data example:

p_health|health|potion12345
p_mana|mana|potion32568


Basically I'd like to populate a database (potionlist) with all my potions, then update each potion type record in the potions database with the potion in the potionlist database having the leas number of sips.

Not sure if I explained that well lol!

I'm having problems deleting the potionlist database before repopulating it and also to be honest, have no idea how to update the potions database with the information held in the potionlist database.

Hopefully soomebody can help/point me in the right direction!

Thanks
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net