First off I would like to thank you for taking time to make this module.
I installed the module fine and it seems to be working. Discounts were being applied correctly on the checkout page. One problem I ran into was when I tried to delete a discount. This is the error that was displayed. I obviously ***'d out my information.

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';DELETE FROM uc_discounts_products WHERE discount_id=1;DELETE FROM uc_discounts_' at line 1 query: DELETE FROM uc_discounts_uses WHERE discount_id=1;DELETE FROM uc_discounts_products WHERE discount_id=1;DELETE FROM uc_discounts_terms WHERE discount_id=1;DELETE FROM uc_discounts_codes WHERE discount_id=1;DELETE FROM uc_discounts WHERE discount_id=1; in /***/***/***/***/sites/all/modules/uc_discounts_alt/uc_discounts/uc_discounts.module on line 615.

Thanks in advance.

Comments

ryangroe’s picture

Assigned: Unassigned » ryangroe

Sorry for the delay, I hadn't signed up for issue notification so I am just seeing this today.

Can you tell me what MySQL version are you using?

ryangroe’s picture

Status: Active » Needs review

Never mind on the information. I am going to make a change that should fix your problem no matter what MySQL version and driver you are using. I am just going to split the commands and run each individually. It is a little less efficient but more cross driver compatible.

Look for this fix in beta 4.

gooddesignusa’s picture

Thanks a lot ryangroe. You are the man.

Sborsody’s picture

Status: Needs review » Fixed

No activity in a very long time, assuming fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

surendra.psd’s picture

Version: 6.x-1.0-beta2 » 6.x-2.4
Assigned: ryangroe » surendra.psd
Status: Closed (fixed) » Active

I am using user notification 6.x-1.x-dev and drupal 6.28. I got the following error:-

"user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS actor FROM user_notifications_index ni INNER JOIN user_notifications_mess' at line 1 query: SELECT ni.nid, ni.recipient, ni.is_new, nm.subject, nm.body, nm.format, nm.tag, nm.timestamp, u.* AS actor FROM user_notifications_index ni INNER JOIN user_notifications_messages nm ON ni.nid = nm.nid INNER JOIN users u ON nm.actor_uid = u.uid WHERE ni.recipient = 7 ORDER BY nm.timestamp DESC LIMIT 0, 5 in C:\wamp\www\drupal-6.28\modules\user_notifications\user_notifications.module on line 406."

Please help

Sborsody’s picture

Assigned: surendra.psd » Unassigned
Status: Active » Closed (fixed)

Wrong module...