query($spt) or die("ERROR $spt"); $rpt=mysqli_fetch_assoc($rept); ?> |
query($sai2) or die("Error $sai2"); while($rai2=mysqli_fetch_assoc($reai2)){ ?>

ประกาศแนะนำ หมวดหมู่

query($spre) or die("ERROR $spre"); while($rpre = mysqli_fetch_assoc($repre)){ $urlpre=rewrite($rpre['post_title']); //post img $spic="SELECT picshow FROM `classified_post_img` WHERE post_id='$rpre[id]'"; $repic=$mysqli->query($spic) or die("ERROR $spic"); $rpic=mysqli_fetch_assoc($repic); //province $sprv="SELECT classified_post_contact.province_id, province.PROVINCE_ID, province.PROVINCE_NAME FROM `classified_post_contact` "; $sprv.="LEFT JOIN province ON classified_post_contact.province_id=province.PROVINCE_ID "; $sprv.="WHERE classified_post_contact.post_id='$rpre[id]'"; $reprv=$mysqli->query($sprv) or die("ERROR $sprv"); $rprv=mysqli_fetch_assoc($reprv); $urlprv=rewrite($rprv['PROVINCE_NAME']); //category $scate="SELECT id, cate_name FROM `category` WHERE id='$rpre[cate_id]'"; $recate=$mysqli->query($scate) or die("ERROR $scate"); $rcate=mysqli_fetch_assoc($recate); $postcate=rewrite($rcate['cate_name']); // sub category $ssub="SELECT id, sub_cate_name FROM `sub_category` WHERE id='$rpre[sub_cate_id]'"; $resub=$mysqli->query($ssub) or die("ERROR $ssub"); $rsub=mysqli_fetch_assoc($resub); $postscate=rewrite($rsub['sub_cate_name']); ?>