PLUS EMU / Database Needed SQL Code

Status
Not open for further replies.

Flukey

Officially the gratest alive!
Sep 17, 2018
105
18
Hi do anyone ahve the SQL Code to select a catalog page and to pull up the page with all the furni thats in that page?

been looking everywhere my mate sent me it before but he hasn't replied to any of my messages.

Thanks
 

Joe

Well-Known Member
Jun 10, 2012
4,172
1,955
Filter your page in Navicat, to pull items from a certain page filter it by page_id in the catalog_items table for that specific id.

Example if I wanted to filter everything in the Habbo Exchange section, I would filter the catalog_items by page_id 13 this then gives me the results for just that id page :)
 

Flukey

Officially the gratest alive!
Sep 17, 2018
105
18
Ahh but there is another way it was something like

SECLECT catalogue_pages FURNITURE something like that
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
To quickly find a catalog page using page name
Code:
SELECT * FROM catalog_pages WHERE caption = 'PageName'

To locate all of the catalog_item values from a catalog page using Page Name
Code:
SELECT * FROM catalog_items WHERE page_id IN (SELECT id FROM catalog_pages WHERE caption = 'PageName')

To locate all of the catalog_item values from a catalog page using Page ID
Code:
SELECT * FROM catalog_items WHERE page_id = '#'
 

Flukey

Officially the gratest alive!
Sep 17, 2018
105
18
To quickly find a catalog page using page name
Code:
SELECT * FROM catalog_pages WHERE caption = 'PageName'

To locate all of the catalog_item values from a catalog page using Page Name
Code:
SELECT * FROM catalog_items WHERE page_id IN (SELECT id FROM catalog_pages WHERE caption = 'PageName')

To locate all of the catalog_item values from a catalog page using Page ID
Code:
SELECT * FROM catalog_items WHERE page_id = '#'

Thank you sir.
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
Oh and one more I forgot...

To locate all the furniture values for items on a page with the given pagename
Code:
SELECT * FROM FURNITURE WHERE id IN (SELECT catalog_items.item_id FROM catalog_items WHERE page_id IN (SELECT id FROM catalog_pages WHERE caption = 'PageName'))
 
Status
Not open for further replies.

Users who are viewing this thread

Top