July 14, 2016

Single SQL query with GROUP_CONCAT, DISTINCT and SEPARATOR.



Here is example for use GROUP_CONCAT, DISTINCT and SEPARATOR in single sql query,

Example:

SELECT group_concat(distinct (id) SEPARATOR ', ') AS ID FROM (tablename) WHERE 1=1

Enjoy!

No comments:

Post a Comment

Integrating Google reCAPTCHA v3 in HTML Form with PHP

  What is Google reCAPTCHA v3? Google reCAPTCHA is a free service that helps protect websites from spam and abuse. reCAPTCHA v3 is the lates...