Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Person search does not allow search by FirstName + LastName #306

Closed
BackSH00TER opened this issue Apr 23, 2023 · 6 comments
Closed

Person search does not allow search by FirstName + LastName #306

BackSH00TER opened this issue Apr 23, 2023 · 6 comments
Labels
need more info Need more information to resolve this.

Comments

@BackSH00TER
Copy link
Contributor

If you search by first and last name you will get no results, you have to search by either one
image

image
image

Profiles search appears to support search by first and last, so we just need to borrow the logic from there
image

@BackSH00TER BackSH00TER added the enhancement New feature or request label Apr 23, 2023
@BackSH00TER
Copy link
Contributor Author

Reference line we use for searchProfiles
local people = MySQL.query.await("SELECT p.citizenid, p.charinfo, md.pfp FROM players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE LOWER(CONCAT(JSON_VALUE(p.charinfo, '$.firstname'), ' ', JSON_VALUE(p.charinfo, '$.lastname'))) LIKE :query OR LOWER(charinfo) LIKE :query OR LOWER(citizenid) LIKE :query AND jobtype = :jobtype LIMIT 20", { query = string.lower('%'..sentData..'%'), jobtype = JobType })

@MonkeyWhisper MonkeyWhisper added bug Something isn't working and removed enhancement New feature or request labels Apr 24, 2023
@MonkeyWhisper
Copy link
Member

If you search by first and last name you will get no results, you have to search by either one image

image image

Profiles search appears to support search by first and last, so we just need to borrow the logic from there image

I can search by last name, check this out

https://gyazo.com/31f2a1da0f994cb993bf0e5516dc90dd

@MonkeyWhisper MonkeyWhisper added need more info Need more information to resolve this. and removed bug Something isn't working labels Apr 26, 2023
@BackSH00TER
Copy link
Contributor Author

@MonkeyWhisper The bug is that if you type FirstName LastName the results will not show.
You can only search if you put ONLY First OR Last. Combined does not work.

@BackSH00TER BackSH00TER reopened this Apr 27, 2023
@MonkeyWhisper
Copy link
Member

@MonkeyWhisper The bug is that if you type FirstName LastName the results will not show. You can only search if you put ONLY First OR Last. Combined does not work.

Ops! Sorry, okay, yup, I was able to duplicate it

Searching for both first AND last name, no results

@MonkeyWhisper
Copy link
Member

@MonkeyWhisper The bug is that if you type FirstName LastName the results will not show. You can only search if you put ONLY First OR Last. Combined does not work.

https://gyazo.com/945ee100267fedf00fdc3bbcf2c79313

Check it out :)

@MonkeyWhisper
Copy link
Member

#317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Need more information to resolve this.
Projects
None yet
Development

No branches or pull requests

2 participants