|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tutorials::Requests Post any request for Tutorials here |
|
|
|
03-18-2005, 07:06 PM
|
Sarnak
|
|
Join Date: Jul 2004
Posts: 36
|
|
combined containers sql guide
Hi,
Its been awhile since Ive posted, few may remember my post scripting the monk epic in perl awhile ago. However, I never really did much after I scripted it. Eventually Id like to complete it by adding the sql for the containers. Which brings me to this post.
Ive been working on alot of quests from live that at some point use items in a combine container to get a filled container for the quest handin. For example Ill post some sql below:
----
#item you'll get after container is combined.
INSERT INTO tradeskill_recipe (name,tradeskill,skillneeded,trivial,nofail,
replace_container,notes) VALUES ('Filled Penance Bag,69,0,0,1,0);
#container to combine items in
INSERT INTO tradeskill_recipe_entries (recipe_id,item_id,successcount,failcount,
componentcount,iscontainer) VALUES (0000,17091,0,0,0,1);
#8 bone fragments to be combined in container
INSERT INTO tradeskill_recipe_entries (recipe_id,item_id,successcount,failcount,
componentcount,iscontainer) VALUES (0000,24769,0,0,8,0);
----
what I dont understand is the recipe_id, which I typed 0000, above. The recipe_id's will all be the same number for the container and bone fragments, but how do you figure out what the recipe_id is if this recipe doesnt exist in the database yet? Im just using the mysql terminal, and still in the process of learning so any help would be greatly appreciated. any quick guides, tips, etc...
Sensu-Bean
Last edited by Sensu-Bean; 03-19-2005 at 03:09 AM..
|
|
|
|
03-21-2005, 03:53 AM
|
Fire Beetle
|
|
Join Date: Jun 2004
Location: Canada
Posts: 24
|
|
The recipe ID is the ID of:
INSERT INTO tradeskill_recipe (name,tradeskill,skillneeded,trivial,nofail,
replace_container,notes) VALUES ('Filled Penance Bag,69,0,0,1,0);
Which is auto incremented after you insert it.
__________________
~ bUri
|
03-21-2005, 06:27 AM
|
Sarnak
|
|
Join Date: Jul 2004
Posts: 36
|
|
re: knightz
ok, so what your saying is after i insert this line:
INSERT INTO tradeskill_recipe (name,tradeskill,skillneeded,trivial,nofail,
replace_container,notes) VALUES ('Filled Penance Bag,69,0,0,1,0);
the recipe_id is automatically adjusted to a certain number. my question is how can I find out what that number was set to. because where the 0000 is after VALUES in the post below is the same recipe_id that it was set to above. how can i find this number? still learning sql.
#8 bone fragments to be combined in container
INSERT INTO tradeskill_recipe_entries (recipe_id,item_id,successcount,failcount,
componentcount,iscontainer) VALUES (0000,24769,0,0,8,0);
|
03-21-2005, 08:08 AM
|
Fire Beetle
|
|
Join Date: Jun 2004
Location: Canada
Posts: 24
|
|
SELECT id FROM tradeskill_recipe WHERE name='Filled Penance Bag';
That will give you the id of the recipe, then just that id in place of 0000 in the other queries.
__________________
~ bUri
|
03-21-2005, 08:37 AM
|
Sarnak
|
|
Join Date: Jul 2004
Posts: 36
|
|
ahhh.. I see.
I was doing this:
SELECT recipe_id FROM tradeskill_recipe WHERE name='Filled Penance Bag';
instead of doing:
SELECT id FROM tradeskill_recipe WHERE name='Filled Penance Bag';
thanks for the help
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:38 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|