Post by fourgood » Sun Nov 11, 2012 7:26 pm

Im using 1.4.9.1
At the time im having about 500 Coupon Codes and about 400 of them are used and useless.

Is it possible to batch remove used coupon codes?
Maybe with a SQL command?

Active Member

Posts

Joined
Wed Oct 20, 2010 9:49 pm

Post by pedro1993 » Sun Nov 11, 2012 10:40 pm

I haven't tested this but you could try this:

Code: Select all

DELETE FROM coupon WHERE coupon_id IN (SELECT coupon_id FROM coupon_history)
Let me know how you get on.

Peter

For OpenCart & PHP/MySQL support feel free to PM me :)
Click here for my extentions
Did I help you? Donate here to show support


Active Member

Posts

Joined
Tue Oct 18, 2011 4:31 am
Location - Glasgow, Scotland

Post by fourgood » Mon Nov 12, 2012 5:18 am

i belive coupon_history doesnt exist in 1.4.9.1

Active Member

Posts

Joined
Wed Oct 20, 2010 9:49 pm

Post by pedro1993 » Mon Nov 12, 2012 11:33 pm

Ah, sorry I wasn't aware of that. I will have look and come back to you soon!

For OpenCart & PHP/MySQL support feel free to PM me :)
Click here for my extentions
Did I help you? Donate here to show support


Active Member

Posts

Joined
Tue Oct 18, 2011 4:31 am
Location - Glasgow, Scotland
Who is online

Users browsing this forum: No registered users and 14 guests