ORA-01036:非法变量名称/编号 - oci_bind_by_name

时间:2015-12-29 09:29:41

标签: php sql oracle oci

$letter= "A";
$statement = oci_parse($connection, "select * from person where firstname like ':letter%'");
oci_bind_by_name($statement, ':letter', $letter);

我已经使用"选择*来自人物"它起作用了。 我想得到一个名字以" A"开头的名单。这可能吗?

1 个答案:

答案 0 :(得分:1)

尝试将您的查询更新为:

oci_parse($connection, "select * from person where firstname like :letter || '%'");