I am submitting a value thru a form, based on the value a var is passed to the query.
function getValueSub( $data) {
$primary = ( $data['primary'] == 4) ? array(0,1,2) : $data['primary'];
return array($this->alias . '.primary' => $primary);
}
But if zero is the value submitted its not passed to the query. The statement for this condition is completely left out of the query.
What am I doing wrong here? If 1 or 2 or 4 are passed no problem but if the form select box is opted for the option with the value of zero it does not work
K
No comments:
Post a Comment