WHERE keyword to my query
Posted: Mon Feb 10, 2014 12:32 am
Hi,
I have a query like below
$query = "SELECT id,event_id,dayNo,themeName,sessionTime,sessionTopic from agenda WHERE event_id='4' AND dayNo='2'";
I don't want to use the same query for all requests.How can i add the WHERE keyword to my query only if the required parameters are passed to my service. I can change query at run time.
Thanks in advance
I have a query like below
$query = "SELECT id,event_id,dayNo,themeName,sessionTime,sessionTopic from agenda WHERE event_id='4' AND dayNo='2'";
I don't want to use the same query for all requests.How can i add the WHERE keyword to my query only if the required parameters are passed to my service. I can change query at run time.
Thanks in advance