I want to get multiple table data into a page.
Actually, I am trying to get table data according to its page id.
$page = $_GET['v'];
if($page == 1){
$sel_data="SELECT * FROM fix ORDER BY fix_id DESC ";
$qri_res=mysqli_query($con,$sel_data);
}
if($page == 2){
$sel_data="SELECT * FROM seo ORDER BY seo_id DESC ";
$qri_res=mysqli_query($con,$sel_data);
}
if($page == 3){
$sel_data="SELECT * FROM err ORDER BY err_id DESC ";
$qri_res=mysqli_query($con,$sel_data);
}
while($total_row=mysqli_fetch_array($qri_res)){
but it resulting me only first one. Please help me to solve this out.
3
Answers
You are overriding $qri_res. You must use 3 variables or appending the data result.
I think it’s a problem with string versus int.
Use this to make it a safe INT:
Use this to compare it