Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Help With Activerecord Or Operator

$
0
0
Hi, I am having an issue which I know is simple but can't figure it out.

I have an array of attributes that come from the user, for example colors:
array(blue, red, green, pink)

I have a model class that extends from activerecord that has color as an attribute.

Using activerecord I want to search for all records that have blue OR red OR green OR pink.

How can achieve this?

Thanks in advance!!!

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>