DwZone Forum DwZone Forum
Welcome to the DwZone-it Forum
 
  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  
    RegisterRegister -->   LoginLogin  
Advanced Search  
DwZone Forum Index -> Advanced Search

Moderators: AdministratorsModerators 
Hint: For improved responsiveness, use Internet Explorer 4 (or above) with Javascript enabled, choose 'Dynamic' from the View dropdown and hit 'Set Options' to save your changes.
New Topic Search for
 View     Per page     Messages Since 
Messages 41 to 50 of 282 (Total: 122) First |  Prev |  Next |  Last  
 Subject Author Date  
   Re: advance search results page  
View this persons public profile  JohnMerlino   21:25 12 Dec 2011  
   Re: advance search results page  
View this persons public profile  Gianluigi   12:55 13 Dec 2011  
   Re: advance search results page  
View this persons public profile  JohnMerlino   19:41 13 Dec 2011  
   Re: advance search results page  
View this persons public profile  Gianluigi   9:38 14 Dec 2011  
   Re: advance search results page  
View this persons public profile  JohnMerlino   13:55 14 Dec 2011  
   Re: advance search results page  
View this persons public profile  Gianluigi   15:07 14 Dec 2011  
   Re: advance search results page  
View this persons public profile  Elizabeth Halliday   13:01 27 Feb 2012  
    Issue with search GROUP_CONCAT function in search query.  
View this persons public profile  JonathanJarzembowski   14:22 17 Oct 2011  
 
Hi Doing well here at the moment, but have hit an issue with searching a group concat function using the advanced search.

Below is my query, any chance you can help?

SELECT accounts.Account_ID, accounts.Status, cus_statuses.CUS_S_Name, accounts.Acc_Type, accounts.First_Name, accounts.Last_Name, accounts.County, accounts.OfficeBelong, accounts.ShortProfile, cus_profilebuild.CUS_P_User, GROUP_CONCAT(CONCAT_WS(',', accounts.ShortProfile, cus_profilebuild.CUS_E_JInfo, cus_profilebuild.CUS_CP, cus_profilebuild.CUS_Statement, cus_profilebuild.CUS_SShort, cus_profilebuild.CUS_E_CName, cus_profilebuild.CUS_Ed_Name, cus_profilebuild.CUS_Ed_Address, cus_profilebuild.CUS_Ed_Tel, cus_profilebuild.CUS_Ed_Address, cus_profilebuild.CUS_Studied, cus_profilebuild.CUS_SkillsName, cus_profilebuild.CUS_Skills, cus_profilebuild.CUS_WEName, cus_profilebuild.CUS_WE, cus_profilebuild.CUS_AName, cus_profilebuild.CUS_Ach) separator ',') AS 'SString', GROUP_CONCAT(cus_profilebuild.CUS_Specialism separator ',') AS 'SSkills' FROM accounts LEFT JOIN cus_statuses ON accounts.Status = cus_statuses.CUS_S_ID LEFT JOIN cus_profilebuild ON accounts.Account_ID = cus_profilebuild.CUS_P_User GROUP BY accounts.Account_ID, cus_profilebuild.CUS_P_User HAVING accounts.Acc_Type = 34 AND accounts.OfficeBelong = %s

The query works fine when executed, but when I use the alias for the 'One' search it causes an issue with the query creation. I have tried it with the alias as the search column but fails and also if i reference the the whole Group Concat it creates an incorrect query for MySQL.

Values used are as follows for the filter column;
1. 'SString' (alias). Does not work when referenced as `SString`.
2. GROUP_CONCAT(CONCAT_WS(',', accounts.ShortProfile, cus_profilebuild.CUS_E_JInfo, cus_profilebuild.CUS_CP, cus_profilebuild.CUS_Statement, cus_profilebuild.CUS_SShort, cus_profilebuild.CUS_E_CName, cus_profilebuild.CUS_Ed_Name, cus_profilebuild.CUS_Ed_Address, cus_profilebuild.CUS_Ed_Tel, cus_profilebuild.CUS_Ed_Address, cus_profilebuild.CUS_Studied, cus_profilebuild.CUS_SkillsName, cus_profilebuild.CUS_Skills, cus_profilebuild.CUS_WEName, cus_profilebuild.CUS_WE, cus_profilebuild.CUS_AName, cus_profilebuild.CUS_Ach) separator ',') AS 'SString'

Regards,

Jonathan
 
Reply to this current thread  View this persons public profile  Send Private Message
   Re: Issue with search GROUP_CONCAT function in search query.  
View this persons public profile  Gianluigi   14:34 17 Oct 2011  
   Comma Seperated list Continued...  
View this persons public profile  JonathanJarzembowski   3:20 13 Oct 2011  
Last Visit: Wednesday 15 Jan, 2025 7:06 pm First |  Prev |  Next |  Last  
 Login
Username:  Password:    
Read Message Read Message   Unread message Unread message
Read message [popular] Read message [popular]   Unread message [popular] Unread message [popular]
Read message [locked] Read message [locked]   Unread message [locked] Unread message [locked]
All times are GMT-1

Jump to: