$sql="SELECT * FROM $tb where $fields (article like '%$keyword%' ) or ( author like '%$keyword%' ) or (journal_name like '%$keyword%' ) or ( title like '%$keyword%' ) ORDER BY ID DESC";
if($fields==""){ $sql="SELECT * FROM $tb where (article like '%$keyword%' ) or ( author like '%$keyword%' ) or (journal_name like '%$keyword%' ) or ( title like '%$keyword%' ) ORDER BY ID DESC";
}
else{
$sql="SELECT * FROM $tb where $fields like '%".$keyword."%' ORDER BY ID DESC";
}