Is it possible to echo inside a MySQL statement?
For example:
SELECT
p.ID,p.post_title,p.guid,p.post_name,p.post_status,name,taxonomy,
<?php echo "TEXT HERE"?> GROUP_CONCAT(DISTINCT name ORDER BY name DESC SEPARATOR '|') AS 'tags',
Is this possible to get this result {tag1|tag2|tag3} ?
It sounds like this question might be relevant. However this should do what you want:
Which returns:
Make sure to include the
GROUP BYclause. I did add foreign key references but I’m unsure whether MySQL actually uses them for this.