I want to bind the variables in a query like this:
SELECT people.name, conf.id
FROM people, conf
WHERE people.confid=conf.id AND people.name LIKE :c1 AND conf.name LIKE :c2
The binding (I try to use a very simple expression):
$tmp = '%';
$tmp2= '%';
oci_bind_by_name($statement, ':c1', $tmp);
oci_bind_by_name($statement, ':c2', $tmp2);
The Warning: oci_execute() [function.oci-execute]: ORA-01008: not all variables bound in ….php on line 162
If I generate the query on the fly, with: {$tmp} instead of :c1, it works.
Any ideas?
Thanks!
I solved the problem:
I didn’t call the oci_free_statement() method. That’s a little weird, because on my other page in the same database connection, the binding worked fine, without calling the free method…