Please help to solve DB query error

Hi

I did made changes to my website but none very recently.

 

and today just discovered this when I tried to visit the user profile (www.sitename.com/username), and got  database query error:

Query:
SELECT COUNT(*) FROM `bx_photos_main` left JOIN `Profiles` ON `Profiles`.`ID`=`bx_photos_main`.`Owner` left JOIN `sys_albums_objects` ON `sys_albums_objects`.`id_object`=`bx_photos_main`.`ID` WHERE 1 AND `bx_photos_main`.`Status` ='approved' AND `bx_photos_main`.`Owner` ='2' AND `sys_albums`.`Uri` ='SiteName-s-photos'
Mysql error:
Unknown column 'sys_albums.Uri' in 'where clause'
 
and in detail below says:
 
Found error in the file '/home/itzpriva/public_html/inc/classes/BxDolSearch.php' at line506.
Called 'db_value' function with erroneous argument #0.

 

and line 506 has:

return (int)db_value($sqlQuery);

 

 

Would someone please please give me a hand?

 

many thanks

Quote · 10 Jan 2015

can you pm me your site url and cpanel..Ill help you...

"Your future is created by what you do today, not tomorrow." @ www.dexpertz.net
Quote · 10 Jan 2015

Hey, How you have solved this problem? I am getting exactly this error after upgrade to 7.3.2

Quote · 3 Sep 2016

Try to check sys_albums table if there is Uri field exists. If it doesn't exists then I would suggest to restore your site from backup. 

Rules → http://www.boonex.com/terms
Quote · 4 Sep 2016

Hi AlexT,

Thanks for your reply. Actually Uri is exist but sys_albums not adding in the join query. would you kindly check the following query:

SELECT COUNT(*) FROM `bx_photos_main` left JOIN `Profiles` ON `Profiles`.`ID`=`bx_photos_main`.`Owner` left JOIN `sys_albums_objects` ON `sys_albums_objects`.`id_object`=`bx_photos_main`.`ID` WHERE 1 AND `bx_photos_main`.`Owner` ='20524' AND `sys_albums`.`Uri` ='liquidcash-s-photos'

So Unknown column 'sys_albums.Uri' in 'where clause'

Please help

Quote · 4 Sep 2016

I would suggest to compare the following files with the originals:

templates/base/scripts/BxBaseSearchResultSharedMedia.php
modules/boonex/photos/classes/BxPhotosSearch.php 

Rules → http://www.boonex.com/terms
Quote · 5 Sep 2016

Thanks. But still getting the issue.

SELECT COUNT(*) FROM `bx_photos_main` left JOIN `Profiles` ON `Profiles`.`ID`=`bx_photos_main`.`Owner` left JOIN `sys_albums_objects` ON `sys_albums_objects`.`id_object`=`bx_photos_main`.`ID` WHERE 1 AND `bx_photos_main`.`Owner` ='20680' AND `sys_albums`.`Uri` ='Patrick-s-photos'


When i changed the owner id in the sys_albums then fixed for this user but getting issue for another user.

Please help

Quote · 5 Sep 2016

It maybe some modification cause this, I would suggest to disable custom modifications/modules to find the cause of the problem.

Rules → http://www.boonex.com/terms
Quote · 10 Sep 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.