forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: donvalentine on May 29, 2009, 01:35:06 pm

Title: [Solved]: There was an error while processing a database query
Post by: donvalentine on May 29, 2009, 01:35:06 pm
Hello, I have put my board into DeBug mode, but I am not sure of the version of Coppermine I have, I don't see it listed anywhere on the gallery. I goofed something up, I deleted the cpg1410_banned table because I misunderstood some instructions I found online for unbanning myself from my gallery. Now the gallery tells me:  There was an error while processing a database query

I didn't find any google documentation on how to restore the table and was hoping someone here could help me.

Here is my gallery: http://www.pottstownpc.com/gallery

Thanks in advance!

Don
Title: Re: There was an error while processing a database query
Post by: Joe Carver on May 29, 2009, 01:54:24 pm
Your version is old, you can find it when viewing the source of your pages.
Quote
<!--Coppermine Photo Gallery 1.4.19 (stable)-->

If you have made a backup of your database,
Google search like this. (http://www.google.com/search?hl=en&q=restore+mysql+table&aq=7&oq=restore+mysq&aqi=g10)
Title: Re: There was an error while processing a database query
Post by: Joachim Müller on May 29, 2009, 02:01:11 pm
Don't be afraid - the banned table doesn't contain vital information. You just need to re-create the missing table - even if you don't have a backup.
Run the query
Code: [Select]
CREATE TABLE cpg1410_banned (
        ban_id int(11) NOT NULL auto_increment,
        user_id int(11) DEFAULT NULL,
        ip_addr tinytext,
        expiry datetime DEFAULT NULL,
        brute_force tinyint(5) NOT NULL default '0',
        PRIMARY KEY  (ban_id)
) TYPE=MyISAM COMMENT='Data about banned users';
in phpMyAdmin and you should be fine. In the future, be more carefull before messing with the database - usually, there is no such soft recovery possible.
Title: Re: There was an error while processing a database query
Post by: donvalentine on May 29, 2009, 02:48:54 pm
Awesome, thanks so much! I am not very proficient (<-spelling) in MySQL stuff, lol.

I ran that query and the gallery is back! Thanks so much again. You rock!