Hello all,
I’m trying to do that:
  $comptes= ProfilUser::model()->with(array(
         'owner',
         'infosAdmin'=>array(
     
                       'select'=>false,
	                        
                        'condition'=>"infosAdmin.isEmailSent = 0 and infosAdmin.date_renouvellement <= :date",
                        'params' =>array(':date'=>"DATE_ADD(NOW(),INTERVAL 31 DAY)"),
	                        ),
            ))->findAllByAttributes(array('is_active'=>ProfilUser::ACTIF)); 
But the mySql generated query keep the quote ‘’ or “” around DATE_ADD(NOW(),INTERVAL 31 DAY) and then query is useless (syntax correct but useless date_renouvellement < ‘DATE_ADD(NOW(),INTERVAL 31 DAY)’ )
Do you know the meaning to generated sql query in the right way ?
Thanks