Welcome, Guest
Username: Password: Remember me

TOPIC: Script for SQL2Excel extension

Script for SQL2Excel extension 13 years 3 months ago #14863

  • dthadmin
  • dthadmin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 5470
  • Thank you received: 3
sac - the organization and all other fields is found in the jos_dtregister_fields table. Then the actual data from each field for each registration record is stored in the jos_dtregister_user_field_values table.

Please Log in or Create an account to join the conversation.

Script for SQL2Excel extension 13 years 3 months ago #14887

  • sacwebmaster
  • sacwebmaster's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0
I am assume that you are only collecting the organization from the billing (user) and not from each group member.

Run the lower select statement, that deals with the group members, in a database utility, phpMyAdmin, to help determine why the organization field is not being pulled from the user information

Try changing these two lines in the upper and lower union statements:
INNER JOIN cal_dtregister_fields f ON m.field_id = f.id
INNER JOIN jos_dtregister_fields f ON v.field_id = f.id

to:
INNER JOIN cal_dtregister_fields f ON f.id = m.field_id
INNER JOIN jos_dtregister_fields f ON f.id = v.field_id

Please Log in or Create an account to join the conversation.

Script for SQL2Excel extension 13 years 3 months ago #14890

  • temills
  • temills's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
Okay - I think I see the problem now. In the upper select statement, that pulls the group member information, you need to add a join to the jos_dtregister_user_field_values table where the user (billing) information is stored and pull organization from that table.

Please Log in or Create an account to join the conversation.

Script for SQL2Excel extension 13 years 3 months ago #14896

  • divalsafety
  • divalsafety's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 45
  • Thank you received: 0

sacwebmaster wrote: I am assume that you are only collecting the organization from the billing (user) and not from each group member.

Run the lower select statement, that deals with the group members, in a database utility, phpMyAdmin, to help determine why the organization field is not being pulled from the user information

Try changing these two lines in the upper and lower union statements:
INNER JOIN cal_dtregister_fields f ON m.field_id = f.id
INNER JOIN jos_dtregister_fields f ON v.field_id = f.id

to:
INNER JOIN cal_dtregister_fields f ON f.id = m.field_id
INNER JOIN jos_dtregister_fields f ON f.id = v.field_id


Yes, the group members are not required to submit the organziation name. What I'm looking to do is fill in the organzation value into the group member values based on the billing information submitted. Is there a way to force a "copy value" to these blank fields?

Please Log in or Create an account to join the conversation.

Script for SQL2Excel extension 13 years 3 months ago #14897

  • sacwebmaster
  • sacwebmaster's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0
The post from "temills" has the answer. The table you have aliased as "m" in the upper statement is the group member data table and organization is not collected for group members. You need to add a join to the user field values table and get the organization from the user who registered the group and supplied the organization name.

Please Log in or Create an account to join the conversation.

Script for SQL2Excel extension 13 years 3 months ago #14898

  • divalsafety
  • divalsafety's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 45
  • Thank you received: 0

sacwebmaster wrote: The post from "temills" has the answer. The table you have aliased as "m" in the upper statement is the group member data table and organization is not collected for group members. You need to add a join to the user field values table and get the organization from the user who registered the group and supplied the organization name.

Ok, I will definately need help with doing this in phpmyadmin. Would you have a reference tool or guide to recommend?

Please Log in or Create an account to join the conversation.

Time to create page: 0.551 seconds