A bit of database help
Posted: Fri Jun 23, 2023 5:40 pm
I am needing a bit of help deleting some old text/comments from the orders_status_history table. Many years ago I had a setting wrong in PayPal and it led to lots, and I mean lots, of entries in this table that look like
Any one able to offer some sort of advice.
I am now cleaning areas of the database, which is probably unnecessary, so that the whole database is smaller. I have deleted the rest of the message that was there as that was only long bits of text, but I am having problems with this last bit as it contains the order total, in the case of the quote below its the 1.99 bit. I have searched online to see if something similar has been asked but I am a bit lost. I can see wildcard mentioned but cannot find a way to use it to remove the order total figure. Everything in the other messages is exactly the same apart from the order total.PayPal IPN Verified [Completed (Verified; £6.72)]
Is there a way to remove the text and the order total using some form of wildcard on just the last order total bit. It looks like these are several thousand entries like this and I would prefer not to do them all manually.UPDATE orders_status_history SET comments = REPLACE(comments, 'PayPal IPN Verified [Completed (Verified; £1.99)]', ' ')
Any one able to offer some sort of advice.