PHP For Mysql statement keeps taking only first value -


i have php loop sends query , return items, sticks first one.

$query = ("select * test name = '$username'"); $info = $data->execute($query);  for($i = 0;$i<$info->num_rows;$i++) {     $arr = $info->fetch_array();     echo $arr["id"]; } 

in test there 5 fields name username id 1,2,3,4,5 keeps echoing 1, 5 times... other page has , correctly return values..

$query = ("select * mothers childrens='0' order id limit 30");  $ris = $data->execute($query);  //print($ris->num_rows);  for($i = 0;$i<$ris->num_rows;$i++)  {     $arr = $ris->fetch_array();     $bin = $arr["boyfriends"]; } 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -