Sunday, 15 September 2013

where condition from a comma seperated varchar in mysql and codeigniter

where condition from a comma seperated varchar in mysql and codeigniter

i have two tables called musical_types and musical_albums in which
musical_types consists of type_name and an auto increment id, where as in
the musical_albums table contains auto increment id , name , types which
is a varchar which stores the id of musical_types as comma seperated
values like 1,2,3,4 etc. So could anyone please help me in getting all the
albums of type x from musical_albums table.
I tried mysql like but it is not correct. so please help me in writing
this query..
iam using codeigniter, is it possible to write the above mentioned query
in codeigniters active record class.
Thanks in advance.

No comments:

Post a Comment