Someone please can see why the following prepared statment returns nothing?
Posted
by jartaud
on Stack Overflow
See other posts from Stack Overflow
or by jartaud
Published on 2010-04-30T23:15:42Z
Indexed on
2010/04/30
23:17 UTC
Read the original article
Hit count: 169
$stmt = mysqli_prepare($link,"SELECT *FROM ads INNER JOIN dept ON dept.id_dept = ads.in_dpt INNER JOIN members ON members.idMem = ads.from_Mem INNER JOIN sub_cat_ad ON id_sub_cat = ads.ads_in_Cat INNER JOIN cat_ad ON idCat_ad = sub_cat_ad.from_cat_ad WHERE ads_in_Cat = ? ");
if(isset($_GET['fromSCat'])){ $fromSCat = mysqli_real_escape_string($link,$_GET['fromSCat']);}
mysqli_stmt_bind_param($stmt,'i',$fromSCat); mysqli_stmt_execute($stmt); mysqli_stmt_fetch($stmt);
$tot=mysqli_stmt_num_rows($stmt); //Ouput: 0
© Stack Overflow or respective owner