PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |
Old May 9th, 2008, 04:33 PM   #1 (permalink)
Junior Member
Verified Customer
 
Join Date: Apr 2008
Location: Seattle
Posts: 21
[Solved] MySQL error on comment deletion

Hello,

I tried deleted a comment in vbGallery and got this error:

Quote:
Database error in vBulletin 3.7.0:

Invalid SQL:
UPDATE LOW_PRIORITY rwvb_user SET pppcount = pppcount-1 WHERE userid = '1';

MySQL Error : Unknown column 'pppcount' in 'field list'
Error Number : 1054
Request Date : Friday, May 9th 2008 @ 02:17:59 PM
Error Date : Friday, May 9th 2008 @ 02:18:00 PM
Script : http://www.xxxxx.com/testvb/gallery/newreply.php
Referrer : http://www.xxxxx.com/testvb/gall...o=editpost&p=1
IP Address : xx.xx.xx.xx
Username : crkgb
Classname : vB_Database
MySQL Version : 5.0.22-Debian_0ubuntu6.06.10-log
I checked the user table and it doesn't have the pppcount column. Was vbGallery installed incorrectly or where should I look for the solution?

Thank you.

Last edited by crkgb; May 9th, 2008 at 08:03 PM.
crkgb is offline   Reply With Quote
Old May 9th, 2008, 04:42 PM   #2 (permalink)
Junior Member
Verified Customer
 
Join Date: Apr 2008
Location: Seattle
Posts: 21
I think I have found the cause of this, but I'm not sure where to fix it.

The SQL statement the way it is right now:
Quote:
UPDATE LOW_PRIORITY rwvb_user SET pppcount = pppcount-1 WHERE userid = '1';
Correct SQL statement:
Quote:
UPDATE LOW_PRIORITY rwvb_ppgal_user SET pppcount = pppcount-1 WHERE userid = '1';
So basically, I need to provide correct table prefix to the script. Is there a place to do it?
crkgb is offline   Reply With Quote
Old May 9th, 2008, 07:58 PM   #3 (permalink)
Junior Member
Verified Customer
 
Join Date: Apr 2008
Location: Seattle
Posts: 21
I have found a fix for this:

In file: gallery/newreply.php

Find (around line 683):
Quote:
$vbulletin->db->query_write("UPDATE LOW_PRIORITY " . TABLE_PREFIX . "user SET pppcount = pppcount-1 WHERE userid = '" . $vbulletin->userinfo['userid'] . "'");
Replace with:
Quote:
$vbulletin->db->query_write("UPDATE LOW_PRIORITY " . TABLE_PREFIX . "ppgal_user SET pppcount = pppcount-1 WHERE userid = '" . $vbulletin->userinfo['userid'] . "'");
crkgb is offline   Reply With Quote
Old May 10th, 2008, 05:49 AM   #4 (permalink)
Registered User
 
Zachariah's Avatar
 
Join Date: Nov 2005
Location: Canoga Park, CA
Posts: 3,244
Send a message via ICQ to Zachariah Send a message via AIM to Zachariah Send a message via MSN to Zachariah Send a message via Skype™ to Zachariah
Good Find !
Zachariah is offline   Reply With Quote
Old May 11th, 2008, 09:04 AM   #5 (permalink)
Junior Member
Verified Customer
 
Join Date: May 2008
Location: London, UK
Posts: 8
Quote:
Originally Posted by Zachariah View Post
Good Find !
Implemented on my board as well; thanks. Will this fix be included in the next release or should I file this for later so as not to regress my board on the next upgrade?

Cheers,
Dave.
dfidler is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when posting comment nasko ReviewPost How do I...? 9 February 24th, 2009 11:18 AM
Emails on Deletion RCHobbies Classifieds How do I...? 9 June 11th, 2006 09:47 AM
Error when posting comment tidy_boy2005 Photopost Pro Installation & Upgrades 6 January 3rd, 2006 12:20 PM
Error when trying to comment... Big_Ad Photopost Pro How Do I...? 7 December 24th, 2005 09:42 AM
UserGroup and Deletion Pigglet Classifieds Installation & Upgrades 1 July 27th, 2004 11:54 AM


All times are GMT -5. The time now is 08:42 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0