php - CActiveDataProvider with condition value enum -
I have the databse field usetype enum ('0', '1'), with the default 1 position of CactiveDataProvider () When using the value enum it produces reverse rows $ DataProvider = new CActiveDataProvider ('ClubMember', array ('criteria' => array ('condition' =>, 'usertype = 1',)),) ;
Produce all the line with Usertype = 1, that is, Username = 0.
Try to use it
$ dataProvider = new CActiveDataProvider ('ClubMember', array ('criteria' => array ('position' = & gt; 'ezert = "1"'))); This means that you should use the string as the value in ENUM, not the int
Comments
Post a Comment