Quick Search BOX
					Posted: 07 Sep 2017, 17:22
					by Ilovecats
					Is there a way to make the Quick Search box be able to search the 2nd email? 
For example: 
E-mail: 
Johnsnow@gmail.com
2nd E-mail: 
Johnsnow@yahoo.com
If i use quick search for 
johnsnow@yahoo.com nothing will show up.
 
			
									Re: Quick Search BOX
					Posted: 07 Sep 2017, 17:26
					by cptr13
					No idea.
I would recommend putting this as a feature request on our GitHub page
							 
			
									Re: Quick Search BOX
					Posted: 07 Sep 2017, 17:27
					by cptr13
					Ha. Johnsnow... Touche
							 
			
									Re: Quick Search BOX
					Posted: 26 Oct 2019, 05:11
					by copiousquirk
					This would be great. Does anyone know if this is possible?
							 
			
									Re: Quick Search BOX
					Posted: 01 Nov 2019, 15:51
					by copiousquirk
					I've figured this out if anyone is interested. you need to go to the lib folder>search.php file>find the below set of codes and add the below in green
    /**
     * Support function for Quick Search code. Searches all relevant fields for
     * $wildCardString.
     *
     * @param string wildcard match string
     * @return array candidates data
     */
    public function candidates($wildCardString)
    {
        $wildCardString = str_replace('*', '%', $wildCardString) . '%';
        $wildCardString = $this->_db->makeQueryString($wildCardString);
        $sql = sprintf(
            "SELECT
                candidate.candidate_id AS candidateID,
                candidate.first_name AS firstName,
                candidate.last_name AS lastName,
                candidate.phone_home AS phoneHome,
                candidate.phone_cell AS phoneCell,
                candidate.key_skills AS keySkills,
                candidate.email1 AS email1,
                owner_user.first_name AS ownerFirstName,
                owner_user.last_name AS ownerLastName,
                DATE_FORMAT(
                    candidate.date_created, '%%m-%%d-%%y'
                ) AS dateCreated,
                DATE_FORMAT(
                    candidate.date_modified, '%%m-%%d-%%y'
                ) AS dateModified
            FROM
                candidate
            LEFT JOIN user AS owner_user
                ON candidate.owner = owner_user.user_id
            WHERE
            (
                CONCAT(candidate.first_name, ' ', candidate.last_name) LIKE %s
                OR CONCAT(candidate.last_name, ' ', candidate.first_name) LIKE %s
                OR CONCAT(candidate.last_name, ', ', candidate.first_name) LIKE %s
                OR candidate.email1 LIKE %s
                OR candidate.email2 LIKE %s
                OR REPLACE(
                    REPLACE(
                        REPLACE(
                            REPLACE(candidate.phone_home, '-', ''),
                        '.', ''),
                    ')', ''),
                '(', '') LIKE %s
                OR REPLACE(
                    REPLACE(
                        REPLACE(
                            REPLACE(candidate.phone_cell, '-', ''),
                        '.', ''),
                    ')', ''),
                '(', '') LIKE %s
            )
            AND
                candidate.site_id = %s
            AND
                candidate.is_admin_hidden = 0
            ORDER BY
                candidate.date_modified DESC,
                candidate.first_name ASC,
                candidate.last_name ASC",
            $wildCardString,
            $wildCardString,
            $wildCardString,
            $wildCardString,
            $wildCardString,
            $wildCardString,
           $wildCardString,
            $this->_siteID
        );
        return $this->_db->getAllAssoc($sql);
    }
							 
			
									Re: Quick Search BOX
					Posted: 02 Nov 2019, 00:39
					by cptr13
					Very nice.  Thanks!