I'm trying to create a custom report, but I receive error: "Only one query allowed, and it must be a SELECT query."
Problem occurs when I trying to add next string in my query:
GROUP_CONCAT(CONCAT(`client_notes`.`title`,`client_notes`.`description`) SEPARATOR '; ') AS 'Notes'
Full text of my query:
SELECT
`users`.`date_added` AS 'Memeber Since',`clients`.`status` AS 'Client Status',`clients`.`id_value` AS 'CRM #',`contacts`.`first_name` AS 'First Name',`contacts`.`last_name` AS 'Last Name',`contacts`.`company` AS 'Company/Org.',`contacts`.`address1` AS 'Address',`contacts`.`city` AS 'City',`contacts`.`country` AS 'Country',`contacts`.`state` AS 'State/Province',`contacts`.`zip` AS 'Zip/Postal Code',`contacts`.`email` AS 'Email',
GROUP_CONCAT(CONCAT(`client_notes`.`title`,`client_notes`.`description`) SEPARATOR '; ') AS 'Notes'
FROM
`clients`
JOIN `users` ON (`users`.`id`=`clients`.`user_id`)
LEFT JOIN `contacts` ON (`contacts`.`client_id`=`clients`.`id` AND `contacts`.`contact_type`='primary')
LEFT JOIN `contact_numbers` ON (`contact_numbers`.`contact_id`=`contacts`.`id`)
LEFT JOIN `client_notes` ON (`client_notes`.`client_id`=`clients`.`id`)
GROUP BY `clients`.`id`
Question
Anton Qcl
Hello,
I'm trying to create a custom report, but I receive error: "Only one query allowed, and it must be a SELECT query."
Problem occurs when I trying to add next string in my query:
Full text of my query:
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.