Buy Now
Sign in

Loop read data and display results

bensonley , October 09 2018, 12:25
B
bensonley 87
October 09 2018, 12:25 #380680
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 7
October 09 2018, 22:52 #380685
It sure does allow for it, what does your read data action look like?
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
B
bensonley 87
March 05 2019, 15:21 #384449
Sorry i managed to find a fix for this now. Thanks for replying