我正在尝试将表单值数据插入Oracle数据库,但是出现此错误...请帮助...?
if(isset($_POST['submit'])){
$id = $_POST['id'];
$username = $_POST['username'];
$password = $_POST['password'];
$nameen = $_POST['nameen'];
$namear = $_POST['namear'];
echo $sql = "INSERT INTO TESTTABLE (ID,USERNAME,PASSWORD,NAMEEN,NAMEEN) VALUES (:id,:username,:password,:nameen,:namear)";
$compiled = oci_parse($conn, $sql);
oci_bind_by_name($compiled, ':id', $id);
oci_bind_by_name($compiled, ':username', $username);
oci_bind_by_name($compiled, ':password', $password);
oci_bind_by_name($compiled, ':nameen', $nameen);
oci_bind_by_name($compiled, ':namear', $namear);
oci_execute($compiled);
if (! oci_execute($compiled)) {
var_dump(oci_error());
} }
答案 0 :(得分:1)
您的INSERT语句中有两个相同的字段,称为“ NAMEEN”:
aa.pt <> 'Ins'
您要:
INSERT INTO TESTTABLE
(ID,USERNAME,PASSWORD,NAMEEN,NAMEEN) VALUES ...