Hi guys,
sorry for spamming your mailing list.
I have a strange problem with ocibindbyname():
I use this simple code to start an SQL query:
$sql = "Select * from projekte_generisch where pid=:data";
$conn = oci_connect("secret", "secret", "secret");
$cur = oci_parse($conn, $sql);
my_dump($conn, $cur, $sql);
$pid = "einepid";
my_dump(ocibindbyname($cur, ":data", $pid));
my_dump(oci_execute($cur));
print '<table border="1">';
while ($row = oci_fetch_array($cur, OCI_RETURN_NULLS)) {
print '<tr>';
foreach ($row as $item) {
print '<td>'.($item?htmlentities($item):' ').'</td>';
}
print '</tr>';
}
print '</table>';
But this query doesn't give me any data record (no error; empty resultset).
When I use
$sql = "Select * from projekte_generisch where pid='einepid'";
php returns the data record I'm searching for.
What could be the reason? Is there any bug in ocibindbyname or am I
using it the wrong way.
When I use adodb (http://adodb.sf.net) I get the same error:
Using :variable in my query doesn't work but putting the string directly
into the query string it works fine.
What the f*** am I doing wrong?
Any hints are appreciated.
Cheers,
Manuel
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php