Reputation: 135
$letter= "A";
$statement = oci_parse($connection, "select * from person where firstname like ':letter%'");
oci_bind_by_name($statement, ':letter', $letter);
I've already tested it with "select * from person" and it worked. I want to get a list of persons which first names start with "A". Is this possible?
Upvotes: 1
Views: 2439
Reputation: 4760
Try updating your query to this:
oci_parse($connection, "select * from person where firstname like :letter || '%'");
Upvotes: 1