php - why not selecting multiple rows of same standard_id using SQL query from database?

i have invested much more time in simple query ,i was trying to select different rows of same standard_id and in my data

i have invested much more time in simple query ,i was trying to select different rows of same standard_id and in my database is two such rows which have same standard_id but from them i only getting first row of same standard_id and while second row is missing ,i don't know what's i doing wrong , can anyone check please. your any help would be very helpful.

my sql query code:

   <?php 
require_once("../header.php");
include_once("adminTitlebar.php");
error_reporting(E_ALL); 
ini_set('display_errors', 1);
 if(isset($_POST['search'])){
    $standard= $_POST['Standard'];
    $student_name= $_POST['student'];
    $sql="SELECT * FROM `student_details` WHERE `st_standard`=2";

    $result=mysqli_query($con,$sql);
    $rows=mysqli_fetch_assoc($result);
    print_r($rows);
    die;
    $new_array=array();
    array_push($new_array,$rows);
 }
 else{
    //die("failed to search data due to :".mysqli_error());
}
?>

and stored record of my database is:

can only tell me the problems is it in my code or the problems have in database?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744849234a4597026.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信