-1

我使用 PDO 将数据插入到我的数据库中。我使用 bindparam 但我收到了这个错误。我不知道是什么问题。如果有人帮助我提前非常感谢!

无法在第 3 行的 script.php 中通过引用传递参数 2

这是我的代码

<?php
        $sql = $dbc->prepare("INSERT INTO contents VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, )");
        $sql->bindParam('iiissssssssssisiiii', NULL, $GroupID, $UserID, $Title, $Description, $tag_pointer, $Url, $arr['provider_name'], $Text, $arr['type'], $thumbnail, $arr['html'], 'NOW()', '0', getRealIP(), $Active, $Age, '0', '0');
        $sql->execute();
?>
4

1 回答 1

1

进入NULL查询

$sql = $dbc->prepare("INSERT INTO contents VALUES( NULL, ?, ...");

然后根据手册页或至少标记 wiki调用您的 API 函数

于 2013-06-27T14:03:23.670 回答