- Posts: 159
- Thank you received: 6
SQL error
- Alan Henness
- Topic Author
- Offline
- Premium Member
-
Less
More
8 years 5 months ago - 8 years 5 months ago #89368
by Alan Henness
SQL error was created by Alan Henness
I was finalising the acymailing lists associated with each plan and importing subscribers from a csv file. I have imported many times before, but I'm now getting this error:
List 1 is the acymailing list most of the plans subscribe the user to. Should the SQL statement have a subid? Is that's what's causing the error? If so, what's the workaround or fix?
Membership Pro 2.6.4
AcyMailing Enterprise 5.5.0
joomla 3.6.4
ETA: The import seems to stop at this error and no more subscribers are imported.
I've had to change the SQL by adding spacest so doesn't look like an SQL statement to get past your Sucuri firewall - I tried to search for the error in the forum, but it was blocked it as well so I don't know if this has come up before.Error
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3 S Q L=S E L E C T COUNT(*) FROM #__acymailing_listsub WHERE listid = 1 AND subid =
List 1 is the acymailing list most of the plans subscribe the user to. Should the SQL statement have a subid? Is that's what's causing the error? If so, what's the workaround or fix?
Membership Pro 2.6.4
AcyMailing Enterprise 5.5.0
joomla 3.6.4
ETA: The import seems to stop at this error and no more subscribers are imported.
Last edit: 8 years 5 months ago by Alan Henness. Reason: Added additional details.
Please Log in or Create an account to join the conversation.
- Alan Henness
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 159
- Thank you received: 6
8 years 5 months ago #89369
by Alan Henness
Replied by Alan Henness on topic SQL error
Ah. Worked out what is happening. The import stopped at the first subscriber that didn't have an email address (they are members who have subscribed completely offline). Because there is no email address, no joomla account would have been created, which will have caused a problem trying to add a (non-existent) subscriber/joomla user to the acymailing list.
Not sure of a good solution: I don't think I want to create dummy email addresses for these offline payment members. This only happens with one of the plans (I think all the others are subscribers that have an email address), so I could import them without assigning them to an acymailing list then add those with an email address manually.
Maybe adding a (unique) dummy email address to each of the subscribers that don't have an email address would create joomla accounts and would be added to the acymailing list. These joomla accounts that can easily be selected and deleted, which will also delete them from the acymailing list (and also delete the dummy email addresses in Membership Pro.
I did wonder if this would cause a similar issue if a new subscriber is added manually in the backend but it doesn't seem to.
I'll sleep on it but creating dummy email addresses would seem to be a workaround. However, if I ever want to export the subscribers then re-import them (as I'm tweaking the spreadsheet to get everything correct), I would have to add the dummy email addresses again.
Has anyone come across this and found a better solution? Maybe there is something Tuan could do in the future to resolve this?
Not sure of a good solution: I don't think I want to create dummy email addresses for these offline payment members. This only happens with one of the plans (I think all the others are subscribers that have an email address), so I could import them without assigning them to an acymailing list then add those with an email address manually.
Maybe adding a (unique) dummy email address to each of the subscribers that don't have an email address would create joomla accounts and would be added to the acymailing list. These joomla accounts that can easily be selected and deleted, which will also delete them from the acymailing list (and also delete the dummy email addresses in Membership Pro.
I did wonder if this would cause a similar issue if a new subscriber is added manually in the backend but it doesn't seem to.
I'll sleep on it but creating dummy email addresses would seem to be a workaround. However, if I ever want to export the subscribers then re-import them (as I'm tweaking the spreadsheet to get everything correct), I would have to add the dummy email addresses again.
Has anyone come across this and found a better solution? Maybe there is something Tuan could do in the future to resolve this?
Please Log in or Create an account to join the conversation.
- Alan Henness
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 159
- Thank you received: 6
8 years 5 months ago #89555
by Alan Henness
Replied by Alan Henness on topic SQL error
So, I've now tried out my suggestion for a workaround:
1. Create dummy email addresses for those subscribers who do not have one (I used DELETE-<subscriber name>@EXAMPLE.COM to make them unique and to stand out.
2. Import as an xlsx (I had some issues importing as a csv). This will create joomla accounts for each of the dummy email accounts and add them to the acymailing list.
3. Select and delete the joomla accounts for the dummy email addresses. This will also delete the email address from the acymailing list.
This does cause one problem, though: going back to Membership Pro and loading one of the subscribers, I get the following
This is clearly because the joomla account no longer exists. I'm not sure this causes any problems but at least I am now able to import all my subscribers.
Tuan: will this cause a problem, is there a better way to get round the problem or is it something you can fix in the future?
1. Create dummy email addresses for those subscribers who do not have one (I used DELETE-<subscriber name>@EXAMPLE.COM to make them unique and to stand out.
2. Import as an xlsx (I had some issues importing as a csv). This will create joomla accounts for each of the dummy email accounts and add them to the acymailing list.
3. Select and delete the joomla accounts for the dummy email addresses. This will also delete the email address from the acymailing list.
This does cause one problem, though: going back to Membership Pro and loading one of the subscribers, I get the following
Warning
JUser: :_load: Unable to load user with ID: 1933
This is clearly because the joomla account no longer exists. I'm not sure this causes any problems but at least I am now able to import all my subscribers.
Tuan: will this cause a problem, is there a better way to get round the problem or is it something you can fix in the future?
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.