1
I have a form where there are two fields, a service and another value, for each service the user has to put a value, after the user chooses, I check in the bank how many lines will return me with this filter. For the procedure I pass two parameters.
Example of the procedure call:
call('1,2,3', '100,200,300')
This is the call of the procedure, the procedure will receive these two fields being that each of these fields is like a array
. I want to know how I can make one select
where I search for example:
SELECT *
FROM tabela
WHERE codigo = 1
AND valor = 2
AND codigo = 2
AND valor = 20
AND codigo = 3
AND valor = 30
But not able to do this, because everything is like an array, someone has some idea?
Post the structure of your table.
– Thomas Lima
From what I understood the first value refers to the first service, the second value to the second service up to the nth. So you are looking for a service 1 with the value 100? Service 2 with value 200? select * from Where (code = 1 and value=100) or (code = 2 and value = 200) or (code = 3 and value = 300) ?
– Pedro Teles