Skip to content

Instantly share code, notes, and snippets.

@tonmanna
Created July 28, 2016 08:15
Show Gist options
  • Save tonmanna/bb61adae158a4dacebbdcfe1f523c90a to your computer and use it in GitHub Desktop.
Save tonmanna/bb61adae158a4dacebbdcfe1f523c90a to your computer and use it in GitHub Desktop.
Plesk get Current Active Domain
SELECT d.name dateexpire, FROM_UNIXTIME(l.value) expiredate FROM SubscriptionProperties sp
LEFT JOIN Subscriptions s ON s.id = sp.subscription_id
LEFT JOIN domains d ON d.id = s.object_id
LEFT JOIN Limits l ON l.id = sp.value
WHERE sp.`name` = 'limitsId' AND l.limit_name = 'expiration' AND FROM_UNIXTIME(l.value) > CURDATE()
ORDER BY l.value desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment