Regular expressions and triggers
Posted by: Danon Knox
Date: January 20, 2018 02:47PM

I am hoping someone can help me out.
I want to update a table column with search phrases and strings that users may enter in a joomla search box on the front end. The name of the table that captures all the search info is wx4rb_core_log_searches. The name of the table I want to update with these searches is wx4rb_modules. Here comes the trouble, the column in wx4rb_modules called 'params' where I want to store all the data is really a long semi-colon separated string. This is what the entire string looks like:

{"moduleclass_sfx":"","cloudtype":"3","articleid":"1","tags":"business, accounting, directory, yoga","color":"yes","usecolor":"no","choosecolor":"yes","font":"yes","animation":"yes","css":"font-size:12; font-weight:bold;","mytags":"Business, Directory, Accounting, yoga, sodium","searchtype":"all","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":"","style":"0"}

The part I am interested in is:
"mytags":"Business, Directory, Accounting, yoga, sodium","searchtype"

Notice the last string doesn't have a comma(searchtype). How do I or what trigger can I define on table wx4rb_core_log_searches that would update column params and insert the new search word or phrase at the end of the string, "mytags":"Business, Directory, Accounting, yoga, sodium","searchtype"

Hoping I can get some help.

Options: ReplyQuote

Written By
Regular expressions and triggers
January 20, 2018 02:47PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.