Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Tutorials/Howto's > Tutorials--Outdated Use the Wiki > Tutorials::Requests

Tutorials::Requests Post any request for Tutorials here

 
 
Thread Tools Display Modes
  #1  
Old 03-18-2005, 07:06 PM
Sensu-Bean
Sarnak
 
Join Date: Jul 2004
Posts: 36
Default 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..
  #2  
Old 03-21-2005, 03:53 AM
knightz
Fire Beetle
 
Join Date: Jun 2004
Location: Canada
Posts: 24
Default

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
  #3  
Old 03-21-2005, 06:27 AM
Sensu-Bean
Sarnak
 
Join Date: Jul 2004
Posts: 36
Default 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);
  #4  
Old 03-21-2005, 08:08 AM
knightz
Fire Beetle
 
Join Date: Jun 2004
Location: Canada
Posts: 24
Default

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
  #5  
Old 03-21-2005, 08:37 AM
Sensu-Bean
Sarnak
 
Join Date: Jul 2004
Posts: 36
Default

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:38 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3