📜  php pdo fetch from db - PHP 代码示例

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

代码示例2
$pdo = new PDO('mysql:host=$host; dbname=$database;', $user, $pass);
$stmt = $pdo->prepare('SELECT * FROM auction WHERE name = :name');
$stmt->bindParam(':name', $_GET['searchdivebay']);
$stmt->execute(array(':name' => $name);