TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,947
  • Latest: sgm09
Stats
  • Total Posts: 195,748
  • Total Topics: 21,279
  • Online today: 300
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 57
  • Total: 57

help in sql query

Started by fangweile, December 13, 2011, 03:41:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fangweile

I recently updated my tp to the latest version and i have a problem referred to this link
http://www.tinyportal.net/index.php?topic=34573.0

Now i want to run a sql query in phpmyadmin updating all my articles about its panel viewing options.
I want to uncheck this option "Display rightblocks" in all of my articles. I know that it can be achieved thru sql query and I really don't know how.

Any help is gladly appreciated
Thanks in advance.

IchBin

Make a backup before you do anything!

Make sure you substitute smf_ in the table name if you have a different prefix.

update `smf_tp_articles` set options = replace(options, ',rblock,rblockwidth,', ',rblockwidth,')

This should update all articles to remove the right block setting.

fangweile

thanks a lot IchBin, it works great.

fangweile

hello again,

I don't know what happen but when i viewed my articles today, it is showing the right block again.
I tried to run the sql query again but still the right blocks is showing.

thanks in advance

IchBin

And if you go into the article is the right block option turned on? Does it turn off if you uncheck the right block?

fangweile

when i go into the article, the right block is checked and when i uncheck it, the right blocks are turned off when i viewed the article..

IchBin

When you run the query, does it say that it's updated any rows?

fangweile


IchBin

Don't know what to tell you. The query is running fine for me on my test site.

Lum-chan

Don't forget to check this for each category too. If an article has the option 'Use settings from category instead!' activated then the settings of the category apply over the settings of the article itself

This website is proudly hosted on Crocweb Cloud Website Hosting.