|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
Strange question perhaps, but is there any way to change the number of "views" for a thread.
For example if it is currently showing "243", can we say, for example, change it to be "4354" if we wanted to? And then once we have changed that number, any further views will be added as normal?
Thanks
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
it's stored in the database, so you'd have to update that
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
And how would we do that, if you don't mind? (The other way round too of course - ie. making a number smaller....)
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
you'd use phpmyadmin and locate the thread in question; i'm nto entirely sure what tables would need updated offhand as this isn't something I'd update myself so i've not looked into it.
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
I remember with the rating issue I had a while back we could change:
UPDATE ubbt_USER_PROFILE set USER_RATING='0' where USER_ID='###'
Again, just change ### to the userid in question.
That worked I was wondering if there was something similar.
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
Thanks gizmo, it's not something I would normally change either but I want a thread to look less busy than it is (long story....) and if there was a way to do this it would help.
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
that'd be a quick mysql command, and yes it'd work the same way, if i bothered to craft the query; as i wouldn't know where to look offhand I can't craft a simple query; not to mention I think that data is held in a memory resident table as well and am not sure how they work offhand.
Hence the recommendation to login to your SQL server wiht PHPMyAdmin and check.
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
Not exactly sure how to do that, but will look into it. In the meantime if anyone knows what the command might be!
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
Well, it looks like "ubb7_TOPIC_VIEWS" only holds worthless temporary data, so "ubb7_TOPICS" is the key...
Something similar to: UPDATE `ubb7_TOPICS` SET `TOPIC_VIEWS` = 'xxxxx' WHERE `ubb7_TOPICS`.`TOPIC_ID` =xx;
xxxxx would be the view ammount xx would be the topic id ubb7_ would be your mysql database prefix
Last edited by Gizmo; 05/19/2007 7:40 AM.
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
I was just looking ... what exactly is the topic id? I couldn't see one, just an id for each post. Is the topic id the id number of the first post in a thread? (ie, for this thread, #184464)?
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
The topic id is the number of the first post in the thread, yes.
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
Don't want to hassle you but following the format of the other thing earlier in the thread: UPDATE ubbt_USER_PROFILE set USER_RATING='0' where USER_ID='###' ...would that not be.... UPDATE ubbt_TOPICS set TOPIC_VIEWS='2000' where ubbt_TOPICS.TOPIC_ID='184464' (where 2000 is the page view I want to show) ? Thank you!
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
actually I just tried that, didn't seem to work
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
I'd do it as: UPDATE `ubbt_TOPICS` SET `TOPIC_VIEWS` = '2000' WHERE `ubbt_TOPICS`.`TOPIC_ID`='184464';
Only because I'm anal retentive about comments, ticks, backticks, and quotation marks and their proper placement.
Last edited by Gizmo; 05/19/2007 7:39 AM.
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
You could also do: UPDATE `ubbt_TOPICS` SET `TOPIC_VIEWS` = '2000' WHERE `TOPIC_ID`='184464';
Theres a few hundred ways to accomplish the same thing...
Last edited by Gizmo; 05/19/2007 7:39 AM.
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
Thanks Gizmo, unfortunately it didn't change anything when I went into the control panel and tried to change the database. Hmmmmm...
Appreciate the help.
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
I fail to see why it wouldn't, it looks like that's the only place to update... What is returned when you try to issue that command?
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
In the SQL command field when I enter the above ones, it comes back as "0 rows affected"
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
Sadly, this happens sometimes, even when it affects a row; try clearing your cache and check the thread to see if it was actually affected.
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
Try: UPDATE `ubbt_TOPICS` SET `TOPIC_VIEWS` = '2000' WHERE `POST_ID`='184464';
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
Just did that, no change....
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
Try: UPDATE `ubbt_TOPICS` SET `TOPIC_VIEWS` = '2000' WHERE `POST_ID`='184464'; did you do that one?
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
Curious.... that seems to work! I'm sure I did that one before....
Anyway I'll keep an eye on that thread.
Many thanks as always!
|
|
|
|
Joined: Jun 2006
Posts: 16,292 Likes: 116
|
Joined: Jun 2006
Posts: 16,292 Likes: 116 |
there was 2 that where similar; one was topic_id (which i specified wrong) and another i posted as post_id lol...
Anywho, I'm off for the night...
|
|
|
|
Joined: Feb 2007
Posts: 678
old hand
|
old hand
Joined: Feb 2007
Posts: 678 |
Me too. Thanks again.
United for the FA Cup!!!!!
|
|
|
1 members (Havenofsobriety),
458
guests, and
91
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|