Forum Post: Re: Loop Records And Satisfy A Given Condition.

Status
Not open for further replies.
S

Srinivas Panyala

Guest
You can use rbv_api.selectQuery("SELECT ... FROM ..", maxRows, arg1, arg2...) Server API to get the records. Execute rbv_api.selectQuery("SELECT count(*) FROM Customer", 1) to get Count of records. Then execute the select query to get all the records.It returns a double dimensional array. Now you can iterate through this array and implement the logic to perform the validation. Example: var count=rbv_api.selectQuery("SELECT count(*) FROM customer", 1); rbv_api.println(count[0][0]); var names=rbv_api.selectQuery("SELECT customername FROM customer", count[0][0]); rbv_api.println(names[0][0]); Thanks Srinivas

Continue reading...
 
Status
Not open for further replies.
Top