0

I have this query

Select * from mytable WHERE  coalesce(f1,n' ') = ? and  coalesce(f2,n' ') = ? and  coalesce(f3,n' ') = ? and  coalesce(f4,n' ') = ?

f1, f2, f3 and f4 are nvarchar2 fields

I call the query from php with the value array(0,0,0,0)

I get:

ORA-00911: invalid character

When I reduce the query to one coalesce statement, like

Select * from mytable WHERE  coalesce(f1,n' ') = ?

called with array(0),

it works.

When I change the values in the array from 0 to whatever, it does not change anything. What is wrong with my query?

Boneist
  • 22,910
  • 1
  • 25
  • 40
Lokomotywa
  • 2,624
  • 8
  • 44
  • 73

1 Answers1

0

Without your php code, I can only guess that you're calling the select statement by sending the array, instead of listing each value in the array separately.

DCookie
  • 42,630
  • 11
  • 83
  • 92