CMS MADE SIMPLE FORGE

CGUserDirectory

 

[#8002] Query error in the action.default.php file

avatar
Created By: Frédéric Leroy (Fly06)
Date Submitted: Wed May 30 03:37:00 -0400 2012

Assigned To:
Version: 1.3
CMSMS Version: None
Severity: Major
Resolution: Fixed
State: Closed
Summary:
Query error in the action.default.php file
Detailed Description:
when using the directory action {CGUserDirectory action="directory"} and
clicking on one of the active letters I get the following error message:

DEBUG: error in count query
  QUERY = SELECT * FROM cms_module_feusers_belongs WHERE userid=0
  Error =


History

Comments
avatar
Date: 2012-05-30 03:38
Posted By: Frédéric Leroy (Fly06)

Solution:
in the action.default.php file, replace these lines:

$joins[] = cms_db_prefix().'module_feusers_properties P ON U.id = P.userid AND
P.title = ?';
$joinscount[] = cms_db_prefix().'module_feusers_properties P ON U.id = P.userid
AND P.title = ?';

if( $property != '__username__' )
  {
//  $where[] = 'P.title = ?';
//  $wherecount[] = 'P.title = ?';
    $qparms[] = $property;
    $qparmscount[] = $property;
  }

by these ones:

if( $property != '__username__' )
  {
$joins[] = cms_db_prefix().'module_feusers_properties P ON U.id = P.userid
AND P.title = ?';
$joinscount[] = cms_db_prefix().'module_feusers_properties P ON U.id =
P.userid AND P.title = ?';
//  $where[] = 'P.title = ?';
//  $wherecount[] = 'P.title = ?';
    $qparms[] = $property;
    $qparmscount[] = $property;
  }


Context:

CMSMS 1.10.3
FEU 1.17.3
CGUD 1.3

      
avatar
Date: 2012-10-09 14:23
Posted By: Square (square)

Thanks Fly06, that works !

Should be included in next release no ?
      
avatar
Date: 2014-05-30 14:32
Posted By: Robert Campbell (calguy1000)

should be fixed now.
      
Updates

Updated: 2014-08-23 11:21
state: Open => Closed

Updated: 2014-05-30 14:32
resolution_id: 5 => 7
cmsms_version_id: 29495 => -1

Updated: 2012-05-30 03:38
description: when using the directory action {CGUserDirectory action="directory"} and clicking on one of the active letters I get the following error message: DEBUG: error in count query QUERY = SELECT * FROM cms_module_feusers_belongs WHERE userid=0 Error = => when using the directory action {CGUserDirectory action="directory"} and clicking on one of the active letters I get the following error message: DEBUG: error in count query QUERY = SELECT * FROM cms_module_feusers_belongs WHERE userid=0 Error =

Updated: 2012-05-30 03:38
description: Description: when using the directory action {CGUserDirectory action="directory"} and clicking on one of the active letters I get the following error message: DEBUG: error in count query QUERY = SELECT * FROM cms_module_feusers_belongs WHERE userid => when using the directory action {CGUserDirectory action="directory"} and clicking on one of the active letters I get the following error message: DEBUG: error in count query QUERY = SELECT * FROM cms_module_feusers_belongs WHERE userid=0 Error =
resolution_id: => 5