Hi there, i have a simple search ee-weblog “query” that returns entries based on search criteria…(code below)
{exp:weblog:entries weblog="calendar" sort="asc" status="Open|Featured"
show_future_entries="yes"
limit="10"
start_on="{current_time format='%Y-%m-%d 00:00'}"
search:calendar_location="{segment_3}"
dynamic="off"}
<?php //code stuff here ?>
{/exp:weblog:entries}As you see the search criteria is calendar_location field for the entries has to be {segment_3}‘s value. This works just fine, however i need to also compare {segment_3}‘s value to calendar_location2. search:calendar_location2=”{segment_3}” but when i place them together like so (below) it doesnt work at all, returning odd data as if only 1 search worked but not the other in random order.
{exp:weblog:entries weblog="calendar" sort="asc" status="Open|Featured"
show_future_entries="yes"
limit="10"
start_on="{current_time format='%Y-%m-%d 00:00'}"
search:calendar_location="{segment_3}"
search:calendar_location2="{segment_3}"
dynamic="off"}
<?php //code stuff here ?>
{/exp:weblog:entries}Can someone point me in the right direction as to how i can achieve this. In SQL Terms it would should be something like… SELECT * FROM tablename WHERE calendar_location = ‘{segment_3}’ OR calendar_location2 = ‘{segment_3}’;
THANKS !