searching and sorting

hi friends,

I just want to know about there is any possibilities to search and sort a comma seperated value.

i have a data in db like

id - 1

user_id - 4

marks - 78,64,33

i want to show this mark as like

cs- 78

ss - 64

lang - 33.

how i show this in view. someone help me.

thanks in advance

This is not a Yii question, it is a PHP question and should be in another forum.

Check this out: http://php.net/manual/en/function.explode.php

It’s technically possible, using SQL string functions and regular expressions in WHERE/ORDER BY but it can get very difficult, error prone, unmaintainable and unscalable - that’s why we usually dont store comma separated lists of values in database cells.