ค้นหากิจกรรม

คลิกเพื่อค้นหากิจกรรมทั้งหมดจากหมวดหมู่

หรือ

ค้นหาจากคำที่ต้องการ  

  

[insert_php]
$new=$_REQUEST[test];
$search=$_REQUEST[search];

mysql_connect(“localhost”,”bzpgutki_wwp”,”WWPpassword123″);
mysql_select_db(“bzpgutki_wwp”);

if($new ==” and $search==’sent’)
{

}

if($new !== ” and $search==’sent’)
{

$sql_pro1=”SELECT * from wp_term_relationships INNER JOIN wp_posts ON object_id=ID where term_taxonomy_id=’19’ and post_title like ‘%$new%'”;

$result_pro1=mysql_query($sql_pro1);

$rs1=mysql_fetch_array($result_pro1);

$object_id=$rs1[object_id];

if($object_id ==” and $search==’sent’)
{
$new2=’ไม่พบข้อมูล’.$new;
echo”“;
}
if($object_id !=”)
{

$sql_pro1=”SELECT * from wp_term_relationships INNER JOIN wp_posts ON object_id=ID where term_taxonomy_id=’19’ and post_title like ‘%$new%'”;

$result_pro1=mysql_query($sql_pro1);

while($rs1=mysql_fetch_array($result_pro1)){

$object_id=$rs1[object_id];

$post_title=$rs1[post_title];
$guid=$rs1[guid];

$sql_pro22222=”SELECT * FROM wp_posts WHERE post_parent=’$object_id’ and post_mime_type like ‘%image%’ ORDER BY ID desc”;

$result_pro2222=mysql_query($sql_pro22222);

$rs222222=mysql_fetch_array($result_pro2222);

$object_idrs222222=$rs222222[guid];

echo”

   $post_title“;

}
}
}

[/insert_php]