I crashed my database!!! HELP!>!>!>!>!>

3 years 4 months ago #266850 by ku0g
I was attempting to use the search function to display any users that weren't activated just now. I on hitting the search button I got this error displaying:

Unknown column 'a.block' in 'where clause' SQL=SELECT COUNT( DISTINCT a.`id` ) FROM `jos_comprofiler` AS a INNER JOIN `jos_users` AS b ON b.`id` = a.`id` LEFT JOIN `jos_session` AS c ON c.`client_id` in (0,1) AND c.`userid` = a.`id` LEFT JOIN `jos_user_usergroup_map` AS d ON d.`user_id` = a.`id` WHERE ( a.`block` = 1 )

I immediately went to the TOOLS menu (I still have access to all other functions in CB except the User Management). I ran a check on the database and it showed an error with a value of 3 set instead of 0. I did a dry-run and it reported success then did a real run of the recommended fix.

I am still getting the above error message when I try to access User Management. How do I recover from this?

Thanks!

Jim D.

P.S. This is a brand new website that just went active 24 hours ago. I can't afford to be S.O.L. on this one...
3 years 4 months ago #266851 by ku0g
I Googled the entire error string and it gave me a post from Krilleon, to wit:

Ok, found the cause. Quickfix is as follows.

IN: libraries/CBLib/CBLib/AhaWow/Model/XmlQuery.php
ON: Line 835
FROM:
if ( preg_match( '/[a-z]\./i', substr( $this->fieldsArray[$filterValuesArray], 0, 1 ) ) ) {
TO:
if ( preg_match( '/^[a-z]\./i', $this->fieldsArray[$filterValuesArray] ) ) {
Kyle (Krileon)

I manually edited the file and line indicated and HAVE RESOLVED MY PROBLEM!
The following user(s) said Thank You: nant
3 years 4 months ago - 3 years 4 months ago #266859 by Amicus72
Maybe for the future you should think of making a backup of your database ;)
Moderators: beatnantkrileon
Time to create page: 0.418 seconds
Facebook Twitter Google LinkedIn