Jump to content
panacheweb

count active hosting

Recommended Posts

how do I get active hosting account using the internal API for getting the exact number of an active product. I've tried everything I can think of.

Share this post


Link to post
Share on other sites

Hello,

          You might have solved this already. Anyway, from what I understood you need to know number of active hosting products. Here is a way you can do that :

You can write a query like this :  $Data = Capsule::table('tblhosting')->where('domainstatus', '=', ''Active')->count(); You will get the number you required. Please clear me if this is not what you meant.

 

Thank you

Share this post


Link to post
Share on other sites
Posted (edited)

For the API - not sure, but in simple sql terms it'd be

select count(id) from tblhosting where domainstatus="Active" and packageid=(theplanyouwanttocountfor)

Edited by othellotech

Share this post


Link to post
Share on other sites
On 10/3/2017 at 5:55 AM, Vivek Nair said:

Hello,

          You might have solved this already. Anyway, from what I understood you need to know number of active hosting products. Here is a way you can do that :

You can write a query like this :  $Data = Capsule::table('tblhosting')->where('domainstatus', '=', ''Active')->count(); You will get the number you required. Please clear me if this is not what you meant.

 

Thank you

does that include the specifics for a product ID? 

Share this post


Link to post
Share on other sites
8 hours ago, panacheweb said:

does that include the specifics for a product ID? 

no - it would just give you a total number of all products that are active...

if you wanted a total active number for a specific product...

$Data = Capsule::table('tblhosting')
		->where('packageid','1')
		->where('domainstatus','Active')
		->count();

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines