Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
The Case of the Missing Posts

WrÅith was shocked to discover this morning that one of his admins has all of his posts missing.

"Where have they gone," he asked himself.

So, being the dutiful admin that he is, he immediately began an investigation. Calling in the infamous Dr. Watson (o.k. not really, it was me), he began a search of the database. Performing endless query after endless query, he soon discovered that the posts were indeed located within the database, complete with all of the information required.

Stumped, he began another search of the forums.

"By jove," he exclaimed. "They just aren't there!"

"Hmm," he thought to himself. "Let me check the user's profile."

Sure enough, the posts were listed when Dr. Watson clicked on the Show all user's posts link, yet when Dr. Watson clicked on one of the post titles, there was no post! (Reference attached image Flat.jpg)

*Audience gasps*

Being the astute investigator that he was, Dr. Watson immediately changed his view to Threaded, and was astounded to see a mysterious post appear. (Reference attached image ThreadedPost.jpg) The displayed list of threaded posts even correctly showed the entry from the user. (Reference attached image Threaded.jpg)

Thinking that perhaps it was a mistake with the table, Dr. Watson immediately did a repair and optimization with no success. Baffled, he thought he might try a drastic approach and he dropped all of the indexes and recreated them. Still no success.

Finally, admitting defeat, Dr. Watson has called in his trusted mentor Sherlock Holmes to help....

Thoughts anyone???
Attachments
52408-MissingPosts.zip (0 Bytes, 0 downloads)

Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Elementary my dear Watson. Ok, maybe not but it fit the theme and we can hope

It looks as if the posts might not be attached to the users id properly. A couple queries might lead us to the culprit.

SELECT U_Number FROM w3t_Users WHERE U_Username='LaneDEA'

And

SELECT B_PosterId FROM w3t_Posts WHERE B_Username='LaneDEA'

The numbers returned should match, and they should at least be greater than 2.


UBB.threads Developer
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Brilliant Sherlock! You have solved the case!


Your first query produced '438'

While the second query produced '6'

The two numbers don't match, hence the problem. Now, to solve it, I ran the following two queries:

UPDATE w3t_Users
SET U_Number='6'
WHERE U_Username='LaneDEA'

That set Lane's userID to the proper number

Then, to make sure that the posts matched:

UPDATE w3t_Posts
SET B_PosterId='6'
WHERE B_Username='LaneDEA'

Worked like a charm and the posts are now visible. Thanks Sherlock, once again you have proved your worth!

With sincere appreciation,
Dr. Watson


Last edited by WrÅith; 07/12/2002 4:00 PM.
Joined: Jul 2002
Posts: 1
Lurker
Lurker
Offline
Joined: Jul 2002
Posts: 1
I also wanted to thank you for the help Scream. (:


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)