Insights

How to add or condition in mysql query in symfony

$c->add(TblUsersPeer::USR_TYPE,array(2,3,6),Criteria::IN);
$c1 = $c->getNewCriterion(TblUsersPeer::USR_PARENTID,$this->getUser()->getAttribute(‘userid’),Criteria::EQUAL);
$c2 = $c->getNewCriterion(TblUsersPeer::USR_PARENTID,null, Criteria::ISNULL);
$c1->addOr($c2);
$c->add($c1);

Turn insight into action

Need help with uncategorized 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.

Start a conversationChat on WhatsApp

Related reading

Articles connected to this topic

General Knowledge

Who is Anita Bryant

Anita Bryant is an American singer, former beauty queen, and controversial political activist. She rose to fame in the 1950s and 1960s as a popular vocalist, with hits such as “Paper Roses.” She also gained prominence as a spokesperson for the Florida Citrus Commission in the 1960s and 1970s, becoming closely associate

Jan 12, 2025

Read article

General

क्या भारत तानाशाही राष्ट्र बनता जा रहा है? ये कहां तक सच है!!!

भारत में इस समय लोकतंत्र और तानाशाही के विषय पर बहुत ज्यादा प्रचार हो रहा है। एक ही विषय पर बहुत सारे लेख और यूट्यूब वीडियो चलन में हैं। दरअसल भारत में 2024 का लोकसभा चुनाव होने वाला है, इसलिए हम पहले इन दो शब्दों को समझेंगे और फिर इस विषय पर चर्चा करेंगे कि […]

Apr 19, 2024

Read article

Most recent

Latest posts from the blog

View all articles →