$statement = oci_parse($connection, "select * from customer where username = ':username'");
oci_bind_by_name($statement, ':username', $username);
我想将用户输入与数据库进行比较。我认为声明中的引号存在问题。
答案 0 :(得分:1)
将其更改为此,您不应将绑定变量放在单引号中:
$statement = oci_parse($connection, "select * from customer where username = :username");
有关更多示例,请参阅oci_bind_by_name
文档: