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!

Read data from different tables

vismay 04 Mar, 2018
Hi, I would like to read data from different table that have a certain relation.

The final result must be a table that shows values from different table related with a certain value.

model1.name, model2.email, model3.id, model4.group_id

Example:

model1
read data from "content" where model1.catid:8

ok easy.

This read_data function has a second model,
model2
get "email" from "houses tab" where foreign key from "content" is "alias" with condition model1.alias:model2.hotel


ok, i retrive model2.email

from now on doesn't work anymore.

model3


get "id" from "user" where foreign key from "houses tab" is "email" with condition model2.email:model3.email

doesn't work

I would like to go further:

model4

get "user_group" from "user_group_map" where foreign key from "user" is "id" with condition model3.id:model4:user_id


In attachment the screenshot.


Schermata_2018-03-04_alle_18.34.26.pngSchermata_2018-03-04_alle_18.34.20.pngSchermata_2018-03-04_alle_18.34.13.pngSchermata_2018-03-04_alle_18.34.07.png
Max_admin 25 Mar, 2018
Hi vismay,

You need to use either the foreign key or the "Relation conditions", in case you use the foreign key then the foregn key value should match the "primary key" value on the related model.

Best regards
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
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