Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2007
Posts: 363
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 363
Likes: 8
I tried to prune orphaned likes and got this error:

Quote
Script: /var/www/html/ubbthreads/admin/dorebuildcontent.php
Line: 856
SQL Error: Unknown column 'LIKE_ID' in 'field list'
SQL Error: 1054

Query:

SELECT
COUNT(LIKE_ID) AS COUNT
FROM sbf_LIKES
GROUP BY
TYPE, POST_ID, POSTER_ID, TOPIC_ID, USER_ID
HAVING
COUNT(TYPE) > 1
AND COUNT(POST_ID) > 1
AND COUNT(POSTER_ID) > 1
AND COUNT(TOPIC_ID) > 1
AND COUNT(USER_ID) > 1


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Jun 2006
Posts: 16,301
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,301
Likes: 116
Do you have a _LIKES table? LIKE_ID is the row column; it should have been added as a part of the v7.7.4 install (step 6 of the alter table). It should have 7 columns, LIKE_ID TYPE POST_ID POSTER_ID TOPIC_ID USER_ID TIMESTAMP


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Oct 2007
Posts: 363
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 363
Likes: 8
I only have five: POST_ID, POSTER_ID, TOPIC_ID, USER_ID, TIMESTAMP. Looks like I'm missing LIKE_ID and TYPE. I'm running 7.7.5. Did I miss a step during an upgrade? If so, is there a way to fix it?


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Jun 2006
Posts: 16,301
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,301
Likes: 116
It should look like my attachment
Attachments
LikesTable.png


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Oct 2007
Posts: 363
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 363
Likes: 8
It doesn't.
Attachments
Screenshot 2024-04-08 at 1.30.21 AM.png


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Jun 2006
Posts: 16,301
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,301
Likes: 116
You'll want to use PHPMyAdmin to insert the missing columns, theres also an option for moving columns if you want it to show in PHPMyAdmin the same as my screenshot.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Oct 2007
Posts: 363
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 363
Likes: 8
OK. I don't have phpmyadmin, so I'll have to do it manually. Thanks for your help.


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Dec 2003
Posts: 6,566
Likes: 78
Joined: Dec 2003
Posts: 6,566
Likes: 78
I know this is late but

You could backup your likes table
Install a test board and export the empty like table
Then delete the active likes table
Then import the new likes table
Then import your backup

That would make sure of any mistakes when you fat finger add the missing columns.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Oct 2007
Posts: 363
Likes: 8
Enthusiast
Enthusiast
Joined: Oct 2007
Posts: 363
Likes: 8
I was mistaken about the TYPE column. You can see that from the screenshot that I posted. It already existed. The only thing that was missing was the LIKE_ID column.

All I had to do was add the LIKE_ID column and it was automatically populated with the indexes. Very simple fix.


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 7.7.5
Release 20201027
Server OS Linux
Server Load 0.16
Web Server Apache/2.4.6
PHP Version 7.4.33
MYSQL Version 5.7.43
Database Size 1.85 GB
Joined: Jun 2006
Posts: 16,301
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,301
Likes: 116
I would advise against Rubens suggestion as it would remove all of your like data for the sake of adding a column which is a simple procedure... The off-chance of data being corrupted in your table backup isn't worth the extra steps when you can just add the missing auto increase column.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Dec 2003
Posts: 6,566
Likes: 78
Joined: Dec 2003
Posts: 6,566
Likes: 78
Originally Posted by Gizmo
I would advise against Rubens suggestion as it would remove all of your like data for the sake of adding a column which is a simple procedure...
Yes it is removed till you import the backup.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
Who's Online Now
1 members (Ruben), 323 guests, and 275 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)