Hey guys and (girls)
I need some help here; I'm building a query and for the like of me I don't understand what I'm doing wrong, but you guys to the rescue
$results = $modx->query("SELECT * FROM modx_deal_product WHERE FIND_IN_SET('".$arr[0]."', collection)");
This does exactly as intended, great however?
$results = $modx->query("SELECT * FROM modx_deal_product WHERE FIND_IN_SET('".$arr[0]."', collection)");
if(count($arr)>1)
{
foreach($arr as $keyword)
{
$results->orCondition("FIND_IN_SET('".$arr[$keyword]."', collection");
}
}
This is generating an error "Fatal error: Call to undefined method PDOStatement::orCondition()".
Okay, but what is the right syntax for adding conditional OR statements, potentialy several OR conditions.
Best regards
Moonkin
[ed. note: moonkin last edited this post 13 years, 6 months ago.]