Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么我的 PDO 提取没有从表中返回任何行?
$sql = "SELECT * from ts_rounds WHERE current=:current"; $stm = $pdo->prepare( $sql ); $stm->execute( array( ':current' => 1 ) ); $rows = $stm->fetch(); echo $row["name"];
将 : 放在第一行的 = 之后:
$sql = "SELECT * from ts_rounds WHERE current=:current";