来自https://www.php.net/manual/zh...
$sth->bindParam(':colour', $colour, PDO::PARAM_STR, 12);
12是啥意思?没看懂
<?php
$calories = 150;
$colour = 'red';
$sth = $dbh->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();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…