ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Access to first element of array returned by "read data"?

2D77rus 04 Jun, 2019
Say I have a fairly complex function which reads data from dozen models and returns all matching rows. I use them to make a list of records.
Now I want to create a separate event with a form, to edit one record. This form should use all same models, but only one record. I'd like to use the same function to read data and read its first record only, rather then duplicate the whole function with select type of "one matching record".
In other words, I need something like {var:read_data1[0].Model1.field1} - is it somehow possible?
Thanks!
samir1903 04 Jun, 2019
try
{var:read_data1.[0].Model1.field1} and {var:read_data1[0]Model1.field1}
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com