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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -