php - Phalcon - add OR criteria to find() -


hope can help.

i using find() follows

$query = criteria::frominput($this->di, 'models\templates', $this->request->getpost()); $this->persistent->searchparams = $query->getparams(); $parameters = $this->persistent->searchparams; $templates= templates::find(         $parameters,         ); 

this gives me resulting set of templates based on parameters posted.

what want able add these parameters or somehow.

i.e find templates have criteria per post, or ones have field "global" set y

i going run second query global templates , concatenate results set, surely there must way add or criteria?

any gratefully received!

martin

$query = criteria::frominput($this->di, 'models\templates', $this->request->getpost());  //added below add additional or query criteria builder  $query->orwhere("global = 'y'");  $this->persistent->searchparams = $query->getparams(); parameters = $this->persistent->searchparams; $templates= templates::find(     $parameters,     ); 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -