I want to match a value from multiple columns of a table .but when i execute my code it returns the error Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\srctravellers\php\searchbustiming.php on line 15
My code is :
$tocity=$_POST['tocity'];
$res=mysql_query("SELECT Route FROM routes where $tocity IN('City1','City2','City3','City4','City5','City6','City7','City8','City9','City10')");
while($result=mysql_fetch_array($res)){
echo $result['Route'];
}
Here is snapshot of my columns of my table