I am trying to order results from a select statement by the number of commas existing in one of the column.
is there a way to exclusively order by commas in mysql.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can order your results by the number of comma’s in a specific field with a query like the following:
The order by piece of the query will count all of the characters in the field and then subtract all of the characters not counting the commas. This leaves you with the number of commas.