How to query with multiple conditions in PHP search box? ?
逆向行走
逆向行走 2019-06-20 16:48:02
0
3
1725

I am new to PHP. When writing the content of the search box, I found that I cannot query multiple conditions at the same time. Could anyone please give me some ideas on how to write it? I am grateful for搜索框.png


# This is the pHP content written below:

& LT *) as total from tb_file where f_type=1"; //Find published content

$sql = mysqli_query($conn,$inquire);

$result = mysqli_fetch_assoc($sql ; # No query content yet, please search again

Pagination class

! How to query multiple conditions at the same time

$inquireCon = "select * from tb_file where f_qualitynum like '%$fileNum%' or f_filename like '%$fileName%' or f_department='$department' or f_classify='$qualityfile' order by f_date desc limit ".$page->limit()."";



$sqlCon = mysqli_query($conn, $inquireCon);

while($resultCon = mysqli_fetch_assoc($sqlCon)){

?>

}

}

?>


逆向行走
逆向行走

reply all (3)
!
if (strlen($SO['cate_id'])) { $filter[] = [ 'cate_label', 'like', "%," . trim($SO['cate_id']) . ",%" ]; } if (strlen($SO['audit'])) { $filter[] = [ 'audit', '=', $SO['audit'] ]; } if ($SO['title']) { $filter[] = [ 'title', 'like', "%" . trim($SO['title']) . "%" ]; }

Let’s see if something like this works. This is how tp is written. For native, use splicing. I haven’t written native for a long time.

    逆旅行人

    According to the data obtained, if it is not empty, the splicing conditions will be fine.

      逆向行走

      Upvote it, if you know anything, I hope you can help me. grateful

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!