D
D
Dmitry2014-02-19 23:12:39
SQL
Dmitry, 2014-02-19 23:12:39

How to write a SQL query that changes the attribs parameter in Joomla 2.5?

Hello.
Due to lack of experience, I can’t make a query that would:
In the qweqwe_content table, in a certain category (asset_id), the attribs parameter has changed
from show_title":"" to show_title":"0"
Full text of this parameter
{"show_title":""," link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author ":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stepan Goropashny, 2014-02-19
@rdu

UPDATE qweqwe_content
SET attribs= REPLACE (attribs, '"show_title":""', '{"show_title":"0"')
WHERE asset_id = [n]

D
Dmitry, 2014-02-20
@rdu

Thank you! Helped.
The only thing that had to be changed

UPDATE qweqwe_content
SET attribs= REPLACE (attribs, '"show_title":""', '"show_title":"0"') тут добавлялась лишняя {
WHERE asset_id = (24) тут оказалось с квадратными скобками вылезала ошибка, поменял на круглые, и заработало..

Once again, thank you very much! Saved me a lot of time!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question