Hi there,
I'm using the DB Multi Record Loader for the first time, to combine data from two tables. It's almost exactly like the example in the FAQ. My first DB Multi Record Loader gets 'email' from the users table. The second one connects to a custom table that also has the user id as a field, so I can join the two tables there.
I have the Debugger on and I copied the query it's showing me into phpMyAdmin and I get the correct result, but where the info should be returned in ChronoForms, it just has an empty array.
I tried setting up the same form but only using one DB Multi Record Loader and I got that one working just fine, but again when I tried to add in the connection to the users table so I could get the user's email address...no results.
(Joomla 2.5 and should be the latest version of ChronoForms.)
Any ideas?
I'm using the DB Multi Record Loader for the first time, to combine data from two tables. It's almost exactly like the example in the FAQ. My first DB Multi Record Loader gets 'email' from the users table. The second one connects to a custom table that also has the user id as a field, so I can join the two tables there.
I have the Debugger on and I copied the query it's showing me into phpMyAdmin and I get the correct result, but where the info should be returned in ChronoForms, it just has an empty array.
I tried setting up the same form but only using one DB Multi Record Loader and I got that one working just fine, but again when I tried to add in the connection to the users table so I could get the user's email address...no results.
(Joomla 2.5 and should be the latest version of ChronoForms.)
Any ideas?
In Chronoforms you have to put the linked DB Multi Record Loader above the
primary one to get it to work.
Chronoconnectivity is much easier for linked tables.
Rob
primary one to get it to work.
Chronoconnectivity is much easier for linked tables.
Rob
Hi Rob,
Yes I did that!
I've used ChronoConnectivity in the past, but in this case all I really want to do is get some data and export it to a CSV, not even display it online, add/edit, or anything else I would normally use ChronoConnectivity for, so I thought ChronoForms might be easier.
Yes I did that!
I've used ChronoConnectivity in the past, but in this case all I really want to do is get some data and export it to a CSV, not even display it online, add/edit, or anything else I would normally use ChronoConnectivity for, so I thought ChronoForms might be easier.
Did you set Load Data to yes in the advanced tab of de DB Multi record Loader?
Rob
Rob
Interesting, I set "Group Model Data" to No and now I can see in the debugger that my data is in the array. The data from the main table shows up in the Data Displayer, just not the email that I'm trying to get from the user table. Though I can see that email IS in the results array.
Editing my post...
I managed to use some custom code to get the email from the user table in with the rest of my results. Wheeeew.
Now I've got the CSV exporting with all the data, and I'm trying to add "Column details" so I can customize what the headers of each column say. But it seems to be ignoring my changes. Listing my fields in the "Include columns" or "Exclude columns" boxes doesn't have any effect either, it still just adds everything in the CSV file regardless. Good grief, so close!
How about this one, any ideas?
I managed to use some custom code to get the email from the user table in with the rest of my results. Wheeeew.
Now I've got the CSV exporting with all the data, and I'm trying to add "Column details" so I can customize what the headers of each column say. But it seems to be ignoring my changes. Listing my fields in the "Include columns" or "Exclude columns" boxes doesn't have any effect either, it still just adds everything in the CSV file regardless. Good grief, so close!
How about this one, any ideas?
Hi megana,
Pleas explain exactly what you have added in the various boxes that doesn't work. It would also help if you make it clear which actions you are using. I guess that this is now about the CSV Export action and not the DB Multi Record Loader action??
It might also be useful to see the Debugger output.
Bob
Pleas explain exactly what you have added in the various boxes that doesn't work. It would also help if you make it clear which actions you are using. I guess that this is now about the CSV Export action and not the DB Multi Record Loader action??
It might also be useful to see the Debugger output.
Bob
Hi Bob,
Yes, it's the CSV Export that I'm having issues with now. On the Columns tab, I have it filled out as follows:
Include columns:
mb_expiration_date,title,firstname,middlename,lastname,suffix,mb_id,company,address,address_2,address_3,city,state,zipcode,country,primary_phone,email
Exclude columns: User
Add Titles: checked
Column details:
Expiration Date=mb_expiration_date
Title=title
First Name=firstname
Middle Name=middlename
Last Name=lastname
Suffix=suffix
Member ID=mb_id
Company=company
Address=address
Address 2=address_2
Address 3=address_3
City=city
State=state
Zipcode=zipcode
Country=country
Phone=primary_phone
Email=email
But the result I am seeing is still ALL of the fields added as columns in my CSV file, and the titles are just the field names, not what I specified.
Here is the Debugger output:
Yes, it's the CSV Export that I'm having issues with now. On the Columns tab, I have it filled out as follows:
Include columns:
mb_expiration_date,title,firstname,middlename,lastname,suffix,mb_id,company,address,address_2,address_3,city,state,zipcode,country,primary_phone,email
Exclude columns: User
Add Titles: checked
Column details:
Expiration Date=mb_expiration_date
Title=title
First Name=firstname
Middle Name=middlename
Last Name=lastname
Suffix=suffix
Member ID=mb_id
Company=company
Address=address
Address 2=address_2
Address 3=address_3
City=city
State=state
Zipcode=zipcode
Country=country
Phone=primary_phone
Email=email
But the result I am seeing is still ALL of the fields added as columns in my CSV file, and the titles are just the field names, not what I specified.
Here is the Debugger output:
Data Array:
Array
(
[chronoform] => report_type
[event] => submit
[Itemid] => 67
[option] => com_content
[view] => article
[catid] => 95
[id] => 175
[mb_type] => ACMOC Membership - USA
[input_submit_2] => Submit
[13934bca6e333aecea3c3774e6268731] => 1
[myResult] => Array
(
[0] => Array
(
[mb_expiration_date] => 2014-10-15 06:10:47
[title] =>
[firstname] => Fake
[middlename] =>
[lastname] => 2
[suffix] =>
[mb_id] => 1531
[company] =>
[address] => 1332 Ala Kapuna St
[address_2] => Apt 404
[address_3] => Address Line 3
[city] => Honolulu
[state] => IL
[zipcode] => 60561
[country] => US
[primary_phone] => 123-4567-7890
[t_address] =>
[t_address_2] =>
[t_address_3] =>
[t_city] =>
[t_state] =>
[t_zipcode] =>
[t_country] =>
[User] => Array
(
[email] => fake2@acmoc.org
)
[email] => fake2@acmoc.org
)
[1] => Array
(
[mb_expiration_date] => 2016-10-20 01:10:34
[title] =>
[firstname] => Third
[middlename] =>
[lastname] => Fourth
[suffix] =>
[mb_id] => 1530
[company] =>
[address] => 1302 W. Pioneer Parkway
[address_2] => Apt 404
[address_3] => Third Line
[city] => Peoria
[state] => IL
[zipcode] => 61615
[country] => US
[primary_phone] => 987-654-3210
[t_address] =>
[t_address_2] =>
[t_address_3] =>
[t_city] =>
[t_state] =>
[t_zipcode] =>
[t_country] =>
[User] => Array
(
[email] => fake1@acmoc.org
)
[email] => fake1@acmoc.org
)
)
[csv_link] => http://adcoagency.com/~acmoc/dev/components/com_chronoforms/exports/report_type/csv_export__201310240436.csv
[csv_count] => 2
[csv_size] => 0.5
)
Validation Errors:
Array
(
)
Debug Data
db_multi_record_loader
SELECT `mb_expiration_date`, `title`, `firstname`, `middlename`, `lastname`, `suffix`, `mb_id`, `company`, `address`, `address_2`, `address_3`, `city`, `state`, `zipcode`, `country`, `primary_phone`, `t_address`, `t_address_2`, `t_address_3`, `t_city`, `t_state`, `t_zipcode`, `t_country`, `User`.`email` AS `User.email` FROM `ycx32_acmocuserprofile` AS `myResult` INNER JOIN `ycx32_users` AS `User` ON myResult.user_id = User.id WHERE mb_status = 'Paid' AND unmailable = '0' AND mb_type = 'ACMOC Membership - USA'
CSV Export
$download_export: 0
$download_nosave: 0
Save folder is:
/home/acmoc/public_html/dev/components/com_chronoforms/exports/report_type/
$download_export: xxx
$download_export: 0
File name is:
csv_export__201310240436.csv
2 records were found to export.
Save link is:
http://adcoagency.com/~acmoc/dev/components/com_chronoforms/exports/report_type/csv_export__201310240436.csv
File size is: 0.5 kb
Hi megana,
If you use the Column Details box then any entries in the Include and Exclude boxes are ignored. It's possible that the Titles checkbox is causing a problem, does ti work if you un-check that?
If not I suggest that you try my updated version here as I know that we fixed at least one bug around titles.
Bob
If you use the Column Details box then any entries in the Include and Exclude boxes are ignored. It's possible that the Titles checkbox is causing a problem, does ti work if you un-check that?
If not I suggest that you try my updated version here as I know that we fixed at least one bug around titles.
Bob
This topic is locked and no more replies can be posted.