I am beginner and first time works with database i have problem for executing two query.Please show me some solution for it.
My code is as follow:-
if(isset($_POST["Submit"]))
{
// echo "value is .".$a;
echo $_POST["gr_num"];
echo $_POST["school_code"];
$sqlstr="select studentname from gr_master where grid='".$_POST["gr_num"]."' and schoolcode='".$_POST["school_code"]."'";
$sqlstr1="select schoolname from school_master where schoolcode='".$_POST["school_code"]."'";
$result=mysql_query($sqlstr);
$result1=mysql_query($sqlstr1);
$row=mysql_fetch_array($result);
$row1=mysql_fetch_array($result1);
echo $row["studentname"];
$studentname_var=$row['studentname'].'"';
echo $studentname_var;
}
Here this $row1=mysql_fetch_array($result1); generates error so how to execute two query here without any function like mysqli_multi_query().
gr_numandschool_code?