Created
November 2, 2018 21:40
-
-
Save agarzon/d30ec15cd965f98b473230d5ae57df36 to your computer and use it in GitHub Desktop.
WHMCS export hosting services
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT tblhosting.domain, tblservers.name, tblhosting.domainstatus, tblproducts.name , CONCAT(tblclients.firstname, ' ', tblclients.lastname) AS Client, tblclients.status AS Clientstatus | |
FROM tblhosting | |
LEFT JOIN tblproducts ON tblhosting.packageid = tblproducts.id | |
LEFT JOIN tblservers ON tblhosting.server = tblservers.id | |
LEFT JOIN tblclients ON tblhosting.userid = tblclients.id | |
WHERE tblhosting.domainstatus IN ('Active', 'Suspended') | |
ORDER BY tblservers.id ASC | |
INTO OUTFILE '/tmp/whmcs.csv'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment