how to get data from database using filter values from different arrays?

Hi , 

I have two arrays

local!array1:

{

{name: Jenny, email: jenny@xyz.com}

{name: Rick, email: rick@xyz.com}

}

local!array2:

{

{dep. name: Accounts, id: 2}

{dep. name: Operations, id: 2}

}

now I want to fetch a row from a table in db (SQL SELECT * FROM tablename WHERE email= email at 1..2..3 index at array1 and so on AND dep.name= dep.name with index1..2.33.and soo on in array2

I want 1st at email in array1 to be AND with 1st index of dep.name at array2 and both should fetch a record from db and put  in different local!variable and this should go on with loop for2nd,3rd and soo on arrays

Please help me

  Discussion posts and replies are publicly visible