-2

为什么我的 PDO 提取没有从表中返回任何行?

    $sql = "SELECT * from ts_rounds WHERE current=:current";
    $stm = $pdo->prepare( $sql );
    $stm->execute( array( ':current' => 1 ) );
    $rows = $stm->fetch();
    echo $row["name"];
4

1 回答 1

1

将 : 放在第一行的 = 之后:

$sql = "SELECT * from ts_rounds WHERE current=:current";
于 2013-02-17T19:14:27.270 回答