Jump to content

Viewing products/services in use?


eger

Recommended Posts

I would like to find a way to view which products/services are in use by clients. I thought I was able to do this before a long time ago. But I can't seem to find out how.

 

I would like to cleanup some of my products. But I am not sure which are being used and which are not.

 

Any ideas?

Link to comment
Share on other sites

I thought I saw a page once that showed an overview...

 

With lots of products that could be tedious work. I figured out how to mangle some SQL together to show this. Maybe this could be thrown together as an add-on module (unfortunately I don't know how those work yet).

 

SELECT `tblproducts`.`id` AS 'Product ID', `tblproducts`.`name` AS 'Product Name', COUNT( `tblhosting`.`id` ) AS 'In Use', `tblproductgroups`.`name` AS 'Group'
FROM `tblproducts`
LEFT JOIN `tblproductgroups` ON `tblproducts`.`gid` = `tblproductgroups`.`id`
LEFT JOIN `tblhosting` ON `tblproducts`.`id` = `tblhosting`.`packageid`
GROUP BY `tblhosting`.`packageid`

 

Hope this might help someone in the future!

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated