query($sai2) or die("Error $sai2"); while($rai2=mysqli_fetch_assoc($reai2)){ ?>

ผลการค้นหา

query($stag) or die("ERROR $stag"); while($rtag=mysqli_fetch_assoc($retag)){ $strSQL = "SELECT id, cate_id, sub_cate_id, post_type, post_title, post_s_detail, post_price_type, post_price, post_date, post_view FROM `classified_post` "; $strSQL .= "WHERE classified_post.id='$rtag[post_id]' AND post_actived='1' "; $strSQL .= "ORDER BY post_update DESC LIMIT 0,50"; $objQuery=$mysqli->query($strSQL); while($objResult=mysqli_fetch_assoc($objQuery)){ $posturl=rewrite($objResult['post_title']); //post img $spic="SELECT picshow FROM `classified_post_img` WHERE post_id='$objResult[id]'"; $repic=$mysqli->query($spic) or die("ERROR $spic"); $rpic=mysqli_fetch_assoc($repic); //post post_type $stype="SELECT type FROM `classified_type` WHERE id='$objResult[post_type]'"; $retype=$mysqli->query($stype) or die("ERROR $stype"); $rtype=mysqli_fetch_assoc($retype); //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='$objResult[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='$objResult[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='$objResult[sub_cate_id]'"; $resub=$mysqli->query($ssub) or die("ERROR $ssub"); $rsub=mysqli_fetch_assoc($resub); $postscate=rewrite($rsub['sub_cate_name']); ?>

() - »