Skip to content

Instantly share code, notes, and snippets.

@thiagosf
Created October 5, 2010 18:10
Show Gist options
  • Save thiagosf/612028 to your computer and use it in GitHub Desktop.
Save thiagosf/612028 to your computer and use it in GitHub Desktop.
Múltiplas condições dentro de uma consulta CakePHP
$conditions = array(
'OR' => array(
array('Company.name' => 'Future Holdings'),
array('Company.name' => 'Steel Mega Works')
),
'AND' => array(
array(
'OR'=>array(
array('Company.status' => 'active'),
'NOT'=>array(
array('Company.status'=> array('inactive', 'suspended'))
)
)
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment