Loop read data and display results

bensonley 09 Oct, 2018
H,

I'm trying to loop through a read data function based on an simple array:
[cc_list] => Array
(
[0] => 6
[1] => 10
)

I setup a loop based on {data:cc_list} as the data array and the loop action {fn:create_list} to read a db table {fn:read_corps}

The read_corps function is a read database function that looks for a column matching the cc_list row value:

Con.lists/LIKE:%{var:create_list.row}%

[var] => Array
(
[0] => Array
(
[Con] => Array
(
[aid] => 50
[user_id] => 62
[created] => 2018-10-09 10:17:01
[modified] => 2018-10-09 10:17:22
[contact] => Ben
[agent] => The Bees Knees
[branch] =>
[email] => xxxy@xxx.com
[phone] => 999
[lists] => ["10"]
)

)

)

The event page just lists the debug currently.At the moment I only get the last result from the cc_list array. Do i need to change something in the setup or code? Or does the loop function not allow for multiple db lookups?
healyhatman 09 Oct, 2018
It sure does allow for it, what does your read data action look like?
bensonley 05 Mar, 2019
Sorry i managed to find a fix for this now. Thanks for replying
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger