• Resolved nemadesign

    (@nemadesign)


    When using the Directory Search of WP User Manager 2.7.1 (wpum-directory-search-form) with a name not in the Users Directory, the debug log shows an SQL syntax error (excerpt below).

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the 
    right syntax to use near ') OR() OR ( mt3.meta_key = 'last_name' AND mt3.meta_value LIKE '%schneiders%' )' at line 14 
    for query SELECT DISTINCT SQL_CALC_FOUND_ROWS wp_users.* FROM wp_users 
    LEFT JOIN wp_usermeta ON ( wp_users.ID = wp_usermeta.user_id )  
    LEFT JOIN wp_usermeta AS mt1 ON ( wp_users.ID = mt1.user_id AND mt1.meta_key = '_hide_profile_members' )  
    LEFT JOIN wp_usermeta AS mt2 ON ( wp_users.ID = mt2.user_id )  
    LEFT JOIN wp_usermeta AS mt3 ON ( wp_users.ID = mt3.user_id )  
    LEFT JOIN wp_usermeta AS mt4 ON ( wp_users.ID = mt4.user_id ) WHERE 1=1 AND ( ( 
      ( wp_usermeta.meta_key = 'last_name' 
    	AND (  (  mt1.user_id IS NULL 
    		OR 	( mt2.meta_key = '_hide_profile_members' AND mt2.meta_value = '' )
    	) 
    	AND   ( 
    	 () OR() OR ( mt3.meta_key = 'last_name' AND mt3.meta_value LIKE '%schneiders%' )

    Please let me know if you need further information. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Mark Kevin

    (@mkesteban08)

    Hi @nemadesign ,

    I went ahead and checked this further from my end and it seems that I was not able to replicate the issue as the “No users have been found” notice only showed up. It could possibly be a theme or plugin conflict, could you please try to only activate WPUM and see if the issue will persists?

    Thread Starter nemadesign

    (@nemadesign)

    Hello @mkesteban08

    many thanks for the suggestion. That probably is the reason. However I will not be able to do further tests in the near future, so I’m going to close this thread.

    Thanks again and sorry for the bother 😉

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Directory search for non-existent user throws SQL syntax error’ is closed to new replies.