0
function search_admin($q) {
    $db = load_db();
    $sql = "SELECT keyword FROM keyword WHERE keyword LIKE = '%{$q}%'";
    $sql .= " SELECT title, status
              FROM title
              WHERE CONCAT(title, ' ', status)
              LIKE '%{$q}%'";
    $sql .= " SELECT first_name, middle_name, last_name, cbemail
              FROM employees
              WHERE CONCAT(first_name, ' ' , middle_name, ' ' , last_name , ' ' , cbemail)
              LIKE '%{$q}%'";
    $sql .= " SELECT username FROM users WHERE username LIKE = '%{$q}%'";

    $result = $db->multi_query($sql);

// missing code

}

我似乎无法理解 php 手册中的解释。我希望你能给我更多启发。这是一个搜索栏,例如,他将搜索“待定”。该代码将搜索 3 个表,即标题、员工和用户。然后输出结果。现在我的问题是得到结果查询后该怎么办:/

4

0 回答 0