KrunoslavV
New Pleskian
Hello,
I need to get a list of suspend domains from mysql. The domains are suspend because they exceeded quota.
So far I have done this query:
#############
select domains.id,
domains.name as domena,
Round(((sum(domains.real_size))/1048576),2) realMB,
(select Round((limits.value/1048576),2) from limits left join (domains, subscriptions, subscriptionproperties) on (domains.id=subscriptions.object_id and subscriptions.id=subscriptionproperties.subscription_id and subscriptionproperties.value=limits.id) where subscriptionproperties.name='limitsId' and limits.limit_name='disk_space' and domains.name=domena) quotaMB
from domains
where domains.status='2' and
(select (sum(domains.real_size)))>0
group by domains.cl_id;
#############
but I didnt managed to get only those that exceed the quota.
Can someone help me?
Thank you,
Kruno
I need to get a list of suspend domains from mysql. The domains are suspend because they exceeded quota.
So far I have done this query:
#############
select domains.id,
domains.name as domena,
Round(((sum(domains.real_size))/1048576),2) realMB,
(select Round((limits.value/1048576),2) from limits left join (domains, subscriptions, subscriptionproperties) on (domains.id=subscriptions.object_id and subscriptions.id=subscriptionproperties.subscription_id and subscriptionproperties.value=limits.id) where subscriptionproperties.name='limitsId' and limits.limit_name='disk_space' and domains.name=domena) quotaMB
from domains
where domains.status='2' and
(select (sum(domains.real_size)))>0
group by domains.cl_id;
#############
but I didnt managed to get only those that exceed the quota.
Can someone help me?
Thank you,
Kruno