Buy Now
Sign in

Loop read data and display results

bensonley , October 09 at 12:25
B
bensonley
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
It sure does allow for it, what does your read data action look like?
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman