Hi to all just wanna ask how to achieve something like on show all data if a certain field on the table is equal to 2. basically what im trying to make is a search form by the way the searching part is working it just that its showing all the data what i really need to achieve is show the data if tablefiled==2
THE Table structure is
Id Name Sdate Active_view
1 Person 1 2013-04-1 2
2 Person 2 2013-04-5 1
3 Person 3 2013-04-25 1
4 Person 4 2013-04-1 2
5 Person 1 2013-04-1 1
The process that it undergo is
$searchterm="2013-04-1"
output is
Name Serving Date
Person 1 2013-04-1
Person 4 2013-04-1
and my query is
select * from advance where CONCAT_WS(' ',SDate,'/',Time) like '{$searchterm}%' ORDER BY Id DESC
i tried also something like this but it now showing anything..
select * from advance where Active_view==2 AND CONCAT_WS(' ',SDate,'/',Time) like '{$searchterm}%' ORDER BY Id DESC