Jump to content
  • 0

Unexpected error 'only one query allowed' during creation of custom report


Anton Qcl

Question

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:
 

	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`

 

Link to comment
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...