Show All Users By Customer Id + Solusvm IP
Print
SELECT REPLACE(`clients`.`id_format`, '{num}', `clients`.`id_value`) AS `id_code`, `service_fields`.`value` AS `main_ip`
FROM `clients`
INNER JOIN `services` ON `services`.`client_id` = `clients`.`id`
INNER JOIN `service_fields` ON `service_fields`.`service_id` = `services`.`id`
WHERE `services`.`status` = 'active' AND `service_fields`.`key` = 'solusvm_main_ip_address'
GROUP BY `services`.`id`, `clients`.`id`
ORDER BY `id_code` ASC;
Was this answer helpful?