I’m tapping into xPDO for the first time (woot!)... wondering if someone can point me to the page(s) where the valid operators are listed?
$my_xpdo= new xPDO('mysql:host=localhost;dbname=mydb','myuser','mypassword','');
$my_xpdo->addPackage('edf','/Users/everett/Sites/EDF-modx/html/core/components/edf/model/');
$resources = $my_xpdo->getCollection('MyTable', array(
'description' => 'search for this',
));
$tpl = 'myTpl';
foreach ($resources as $r) {
$resourceArray = $r->toArray();
$resourceArray['cls'] = $rowCls;
$output .= $modx->getChunk($tpl,$resourceArray);
}
return $output;
For example, I want to return all rows from my table where the ’description’ contains ’search for this’. Something like "SELECT * FROM my_table WHERE description LIKE ’%search for this%’;
I stumbled across some of these before, but now I can’t find them... you know... stuff like " ’description:>’ => ’5’," for greater than, etc.
Thanks.