1. muecke06
  2. RO CSVI
  3. Tuesday, 10 July 2018
  4.  Subscribe via email
Hello everybody

new project, new problem ;-)

I have 2 custom tables combined via CSVi PRO. Each of the two tables has an "id" field. Both fields are displayed in the template fields and are assigned to the respective tables. Both id fields have different column headers.

Here is the select from the log:

SELECT `available`,
`j25_configbox_options`.`id`,
`j25_configbox_options`.`sku`,
`j25_configbox_options`.`option_custom_1`,
`j25_configbox_options`.`option_custom_2`,
`j25_configbox_options`.`option_custom_3`,
`j25_configbox_options`.`option_custom_4`,
`j25_configbox_options`.`price`,
`j25_configbox_strings`.`id`,
`j25_configbox_strings`.`type`,
`j25_configbox_strings`.`key`,
`j25_configbox_strings`.`lang_id`,
`j25_configbox_strings`.`text`,
`j25_configbox_strings`.`language_tag`
FROM `j25_configbox_options`
INNER JOIN `j25_configbox_strings` ON `j25_configbox_strings`.`key` = `j25_configbox_options`.`id`


The export works so well.

Problem:
The export will only print the first ID. This value is written to both Export ID fields. The ID of the second table does not appear anywhere in the export.

Can you please check this once?
I looked everywhere ..... but can not find a mistake with me. I see no way to label the ID fields in the SQL statement with "AS".

Regards
Steffen
Accepted Answer Pending Moderation
Hi Tharuna,

super, that works fine :)

Thanks
Steffen
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hello Steffen,
Please find the attached modified patch file. Test it and let me know how it goes.

patch_csvi_2018_07_11_modified.zip
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hi Tharuna,

Yes, I want to test this for you.
Please give me the patch.

Thanks
Steffen
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello Steffen,
Thank you fo confirming that patch works. With MySQL hyphens work with back ticks and that was missing in the code. I fixed that in code. Let me know if you need the patch with this fix included.

Also this fix will be included in our upcoming CSVI release.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hi Guys,

that works great now. Many Thanks.

A hint to you.
I had to replace some column headers. A "-" was apparently not accepted (SQL error), I changed it to a "_". After that, the query worked.
Perhaps you will supplement this information accordingly under the "Help" button in the Template Field Form. That this field should be unique, you have certainly considered.

For me it's time again ..... thank you.

Steffen
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello Steffen,
We have added option to support alias for a field name in Custom table export. You can load the attached patch file to get this functionality. After loading the patch file, all you need to do is to go to CSVI template fields page, select your Custom table export template and for one of your id fields set an alias name in Column header field and save the field. Run the export and check.

Let me know how it goes.

patch_csvi_2018_07_11.zip
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hi Roland,

Yes, this is thesolution. Thanks.

Steffen
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello Steffen,

Just to give you some background information. The issue lies in this:
`j25_configbox_options`.`id`,
`j25_configbox_options`.`sku`,
`j25_configbox_options`.`option_custom_1`,
`j25_configbox_options`.`option_custom_2`,
`j25_configbox_options`.`option_custom_3`,
`j25_configbox_options`.`option_custom_4`,
`j25_configbox_options`.`price`,
`j25_configbox_strings`.`id`,


You have 2 fields with the name id. Since they have the same exact name the export only gets 1 id field because you cannot have duplicate names and that results in you getting 1 value for the id field. As you wrote in your first post, there is no option to assign an alias to a field and that is what we will be adding. So you can make every column unique.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hi Tharuna,

super, thanks

Steffen
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello Steffen,
We don't need your MySQL dump file. We figured out why you are seeing the same ids in your export. We are working on this issue and will send you a patch file when its fixed.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello Steffen,
Can you send me the MySQL dump of your custom tables j25_configbox_options and j25_configbox_strings? You can send that as an email to tharuna@csvimproved.com. I will run the export here and see what happens.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hi Tharuna,

I have now tested: "inner join", "right join", "left join".
The export files are absolutely identical. Same number of records AND the ID values of both fields are the same.

Steffen
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Hello Steffen,
You have used Inner join which will find matching values from both the tables which also means that query gets ids of tables which are same. That must be the reason you are seeing same value for both the id fields. What if you try with left join? Do you get different ids?
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 13
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!