Hi,
I’m working on a small custom ticket system. In addition to an Admin action, I’m trying to implement a Queue action. The desired output of this would simply be the tickets that don’t have a close date.
I’ve tried this:
public function actionQueue()
{
$model=new Ticket('search');
$model->unsetAttributes(); // clear any default values
//$model->attributes=(array('id'=> '10'));
$model->attributes = (array('ticket_close_date'=> null));
$this->render('queue',array(
'model'=>$model,
));
}
But, I still get the full list of tickets, ones that are open and closed.
If I swap the Attribute lines (uncomment the 1st, comment the second), I get a single record for ID 10 in my table.
What am I missing to get a list that matches this SQL: "SELECT * FROM ticket
WHERE ticket_close_date is null" ?