public function admin_search($conn,$search_key){
$stmt = $conn->prepare("
SELECT name,criteria,description,pic from brd_det WHERE name LIKE(:n1)
UNION
SELECT name,criteria,description,pic from cus_det WHERE name LIKE (:n2)
UNION
SELECT name,criteria,description,pic from doc_det WHERE name LIKE (:n3)
UNION
SELECT name,criteria,description,pic from par_det WHERE name LIKE (:n4)
UNION
SELECT name,criteria,description,pic from pro_det WHERE name LIKE(:n5)
UNION
SELECT name,criteria,description,pic from ser_det WHERE name LIKE (:n6)
");
for ($i=1; $i < 7 ; $i++) {
$stmt->bindvalue('n'.$i,'%'.$search_key.'%');
}
//
$result=$stmt->execute();