Formating concat label

Have alist of houses wich i get from k2. the names are like "test - a modern house with big windows". I want the label to only get the first part "test". Is there a way to solve this ?
 
I guess use SUBSTRING_INDEX in the concat label ...

SUBSTRING_INDEX(yourfield, ' - ', 1)

Remember that you can use any MySQL function in the concat label that returns a string. And Google is a very useful resource, so searching for something like "mysql split string with delimiter" will yield answers.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top