0

这不起作用:

public function persist( Forwarding $Forwarding ) {

    $sql = "INSERT INTO forwarding ( inbound_id ) VALUES ( :inbound_id )";

    $statement = $this->pdo->prepare( $sql );

    $statement->bindValue(':inbound_id', $Forwarding->getInboundId() );

    $query = $statement->execute();
}

因为边界值总是NULL. 不能使用回调来绑定 PDO 的准备语句的值吗?

4

0 回答 0