i want to obtain number of rows in query using mysql_num_rows.the query itself contains 2 arrays. i want to store the number in array. Here's my code
$antecedent=array();
for($i=0;$i<=$index;$i++){
if(isset($period[$i])|| isset($gpa[$i]) || isset($antecedent[$i])){
$queryAntecedent=mysql_query("SELECT * FROM mytable WHERE study_period='$period[$i]' AND ipk='$gpa[$i]'") or die (mysql_error());
$antecedent[$i]=mysql_num_rows($queryAntecedent);
}//endif
}//endfor
print_r ($antecedent);
when i only used 1 array inside query, the code works. on the other hand, when i put 2 arrays in it..the code doesn't work(all element in array antecedent contain 0). How to slve this? is it no way using 2 arrays in query? Thank you