📜  pdo bindparam string - PHP 代码示例

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

代码示例1
prepare('SELECT name, colour, calories
    FROM fruit
    WHERE calories < :calories AND colour = :colour');
$sth->bindParam(':calories', $calories, PDO::PARAM_INT);
$sth->bindParam(':colour', $colour, PDO::PARAM_STR, 12);
$sth->execute();
?>