📜  使用 php 搜索数据库条目的功能 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:34.527000             🧑  作者: Mango

代码示例2
$result = mysqli_query($con, "SELECT * FROM employees
    WHERE first_name LIKE '%{$name}%' OR last_name LIKE '%{$name}%'");

while ($row = mysqli_fetch_array($result))
{
        echo $row['first_name'] . " " . $row['last_name'];
        echo "
"; } mysqli_close($con); ?>