为什么我的PDO提取没有从表中返回任何行?
$sql = "SELECT * from ts_rounds WHERE current=:current";
$stm = $pdo->prepare( $sql );
$stm->execute( array( ':current' => 1 ) );
$rows = $stm->fetch();
echo $row["name"];
答案 0 :(得分:1)
把第一行中的=后面:
$sql = "SELECT * from ts_rounds WHERE current=:current";