I’m currently writing a library of PHP stuff for our internal use. I’ve been able to make it do a few fun tricks.
To express a query with a subquery, I can now do this:
$sube = new Expression('subtable');
$sube->setResultField('id');
$sube->beginGroup('and');
$sube->addTerm('field1','=',$valueA);
$sube->addTerm('field2',' =','expr:now()');
$sube->endGroup;
$e = new Expression('table');
$e->addTerm('field2','not in',$sube);
$XQDB->getObjects($e);
I like that!
Schreibe einen Kommentar