Buy Now
Sign in

how to read data from two tables into 1 form ?

pachf11 , October 07 at 16:00
p
pachf11

When I used Database/Read Data and create first model, everything is ok. It load data from table, but I can't config second model with another table (the same database). There is no errors but debugger shows only data from first model. Could you help me? I attach debugger and config:

Array
(
[option] => com_chronoforms6
[chronoform] => returns-form
[language] => pl-PL
[Itemid] =>
[lang] => pl-PL
[ark_inine_enabled] =>
[arkoption] => com_chronoforms6
)
Array
(
[read_data9] => Array
(
[log] => Array
(
[0] => SELECT COUNT(`VMUSERINFOSMODEL`.`virtuemart_userinfo_id`) AS `VMUSERINFOSMODEL.count` FROM `joom_virtuemart_userinfos` AS `VMUSERINFOSMODEL` LEFT JOIN `joom_users` AS `USERSMODEL` ON `VMUSERINFOSMODEL`.`virtuemart_user_id` = `USERSMODEL`.`id` WHERE `VMUSERINFOSMODEL`.`virtuemart_user_id` = '907';
[1] => SELECT `VMUSERINFOSMODEL`.`title` AS `VMUSERINFOSMODEL.title`, `VMUSERINFOSMODEL`.`first_name` AS `VMUSERINFOSMODEL.first_name`, `VMUSERINFOSMODEL`.`last_name` AS `VMUSERINFOSMODEL.last_name`, `VMUSERINFOSMODEL`.`address_1` AS `VMUSERINFOSMODEL.address_1`, `VMUSERINFOSMODEL`.`zip` AS `VMUSERINFOSMODEL.zip`, `VMUSERINFOSMODEL`.`city` AS `VMUSERINFOSMODEL.city`, `VMUSERINFOSMODEL`.`phone_1` AS `VMUSERINFOSMODEL.phone_1`, `VMUSERINFOSMODEL`.`address_type` AS `VMUSERINFOSMODEL.address_type`, `VMUSERINFOSMODEL`.`virtuemart_user_id` AS `VMUSERINFOSMODEL.virtuemart_user_id` FROM `joom_virtuemart_userinfos` AS `VMUSERINFOSMODEL` LEFT JOIN `joom_users` AS `USERSMODEL` ON `VMUSERINFOSMODEL`.`virtuemart_user_id` = `USERSMODEL`.`id` WHERE `VMUSERINFOSMODEL`.`virtuemart_user_id` = '907' ORDER BY `VMUSERINFOSMODEL.address_type` DESC LIMIT 30;
)

[var] => Array
(
[VMUSERINFOSMODEL] => Array
(
[title] => Mr
[first_name] => Paweł
[last_name] => Chojaczyk
[address_1] => Juszkowo Łąkowa
[zip] => 83-000
[city] => Pruszcz Gdański
[phone_1] => 781427556
[address_type] => BT
[virtuemart_user_id] => 907
)

)

)

)

Attachments
model2chronoforms6.jpg
model2chronoforms6.jpg
(82.05 KiB)
79 Downloads/Views
calculus00

Hello pachf11,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
My form data isn't saving to the database correctly
My CFv5 form data isn't saving to the database correctly
How do I save form data to a database table?
How to load record data from a database table into your form
P.S: I'm just an automated service ;)

I'm an automated service, my answers may help, but they may not be accurate.