$cs = new Criteria();
$criterion = $cs->getNewCriterion(HfArticlesPeer::AR_DESCRIPTION,’%’.$searchText.’%’,Criteria::LIKE);
$criterion->addOr($cs->getNewCriterion(HfArticlesPeer::AR_TITLE,’%’.$searchText.’%’,Criteria::LIKE));
$criterion1 = $cs->getNewCriterion(HfArticlesPeer::AR_STATUS,’ARCHIVE’,Criteria::EQUAL);
$criterion1->addOr($cs->getNewCriterion(HfArticlesPeer::AR_STATUS,’PUBLISHED’,Criteria::EQUAL));
$cs->add($criterion1);
$cs->add($criterion);
$cs->add(HfArticlesPeer::AR_CATEGORY ,InsuranceCatId,Criteria::EQUAL);
$searchResInsuranceArticle = HfArticlesPeer::doSelect($cs);
How to apply or condition for mysql query in symfony
Turn insight into action
Need help with web development or a related project?
If this article sparked an idea, question, or project direction, I can help you turn it into a practical next step.
Most recent
Latest posts from the blog
From Developer to Founder: Using AI Automation to Run a One‑Person Business
For many technical leads and developers, the leap from shipping code to managing a business can feel daunting. However, the rise of sophisticated agentic workflows has changed the landscape for the solo entrepreneur. By building a robust AI automation backbone, you can transition from a developer to a founder who manag
Read articleUnderstanding Your Personal Professional Compass
Before diving into job boards or technical certifications, take a moment to evaluate your intrinsic motivators. Career satisfaction is rarely driven by a single factor; it is typically the intersection of your strengths, your interests, and your values.
Read articleWhat matters in a WordPress blog migration
The migration is not only about moving posts. URLs, assets, authors, metadata and redirects all protect long-term search value.
Read article





