HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search
-
Any mySQL/MariaDB gurus around? Need help with query
I'm looking to update from using Emotify plugin to using Emoji Extender. I've got the plugin side working fine. For existing posts, I need to replace, for example, ;lol with :lol: However, I keep running into an issue that I assume relates to the semicolon. A test query using this syntax: UPDATE `gdn_comment` SET `Body`=… -
Re: Any mySQL/MariaDB gurus around? Need help with query
It is definitely the ; which is causing the issue. Running UPDATE `gdn_comment` SET` Body` = REPLACE(`Body`,'lol',':lols:'), WHERE `Body` LIKE '%lol%' works fine, but adding in ;lol OR %;lol% fails. (Any spacing errors are down to formatting on here.) I assume mySQL is interpreting it as ending the code. -
Re: Any mySQL/MariaDB gurus around? Need help with query
So, I am now near my PC - so I could play around/test stuff myself. Have just tested this (used the 'search and replace' -GUI to make it): UPDATE `GDN_Comment` SET `Body` = REPLACE(`Body`, ';lol', ':lol:') WHERE `Body` LIKE '%;lol%' COLLATE utf8mb4_bin That worked Note that there is no comma (,) before WHERE - and ofc the… -
Re: Any mySQL/MariaDB gurus around? Need help with query
@Kaspar Thanks for replying. I think the spaces are just missing from me posting up the code, since in phpMyAdmin I simply swapped out the terms of the successful search with the unsuccessful one. I think the query is failing earlier than the WHERE clause. If I make it UPDATE `gdn_comment` SET `Body`= REPLACE (`Body`,… -
Re: Any mySQL/MariaDB gurus around? Need help with query
Prevoisly suggested: What if you use '";lol"' instead of ';lol' ' " " ' Or ' ' ' ' ***** https://bioticssupport.natureserve.org/support/solutions/articles/201031-insert-update-allow-the-special-characters-and-in-sql-insert-and-update-statements "Semicolon: SET SQLTERMINATOR OFF is supposed to remove the special meaning of…
5 results