fix bugs of search group php and sql