same query return rows in mysql but not on php page
select * from institute where address like '%SOPORE %' works in mysql but return 0 row count in php code
Code:
while($rs = mysql_fetch_array($sql2))
{
$town=$rs[town];
$q="select * from institute where address like '%".$town."%'";//this query
//echo $town;
echo $q;//same query return rows in mysql
//exit();
$sql3 = mysql_query($q);
if(!$sql3) { echo mysql_error();}
$rowcount= mysql_num_rows($sql3) ;
echo $rowcount;
while($rs1 = mysql_fetch_array($sql3))
{
echo 'l2';
?>
Comment