2011-05-05, 08:18 PM
Hi,
For the past few days I've been working on a small plugin which capitalizes a thread titles/post's first letter. Everything seems to be working fine but I need to know how can I undo a previously ran SQL query. The SQL query I'm talking about is: (thanks to Aries-Belgium for helping me with it!)
For those wondering, this capitalizes the first letter of thread titles and posts. I could use exactly the same query and replace UPPER with LOWER, but that will un-capitalize the first letter of all existing threads - even if the first letter was already capitalized before installing the plugin. So my question is how can I undo that SQL query? Like if no query was actually ran. If that's possible, of course.
For the past few days I've been working on a small plugin which capitalizes a thread titles/post's first letter. Everything seems to be working fine but I need to know how can I undo a previously ran SQL query. The SQL query I'm talking about is: (thanks to Aries-Belgium for helping me with it!)
UPDATE ".TABLE_PREFIX."threads SET subject = CONCAT(UPPER(SUBSTRING(subject,1,1)),SUBSTRING(subject,2))
UPDATE ".TABLE_PREFIX."posts SET subject = CONCAT(UPPER(SUBSTRING(subject,1,1)),SUBSTRING(subject,2)), message = CONCAT(UPPER(SUBSTRING(message,1,1)),SUBSTRING(message,2))
For those wondering, this capitalizes the first letter of thread titles and posts. I could use exactly the same query and replace UPPER with LOWER, but that will un-capitalize the first letter of all existing threads - even if the first letter was already capitalized before installing the plugin. So my question is how can I undo that SQL query? Like if no query was actually ran. If that's possible, of course.