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条)