tags:

views:

25

answers:

3
A: 

I think maybe your sql statement is incorrect, you are passing in literally the statement

select n from test where s='{$arr[i]}'

Where you may want to try

$sql="select n from test where s='".$arr[i]."' ";

Separate the php part from the string.

Unless the {} part does that, i am nto that well versed in php =D

Craig
Yes the {} does that. It is very useful.
Phil Wallach
Sweet, well if i ever get back into php looks like i have learnt a new trick :)
Craig
A: 

I saw

while ($row = oci_fetch_array($r, OCI_ASSOC+OCI_RETURN_NULLS))

on PHP doc site http://hu.php.net/manual/en/function.oci-execute.php which sounds somewhat better.

Notinlist
A: 

There may be something funky going on with your query string. I'd recommend not using parameters instead of embeded strings in your sql.

print($sql);

Run it against your db in whatever sql tool you use. Do you get results?

Will Shaver