I have a table with playerhandles, like this:
1 - [N] Laka 2 - [N] James 3 - nor | Brian 4 - nor | John 5 - Player 2 6 - Spectator 7 - [N] Joe
From there I wanna select all players where the first n-chars match, but I don’t know the pattern, only that it’s the first n-chars. In the above example I wan’t it to return rows 1,2,3,4 and 7.
Is this possible and not too expensive to do in MySQL?
You could add an exists clause.
This will give you:
1 – [N] Laka
2 – [N] James
3 – nor | Brian
4 – nor | John
7 – [N] Joe
Add an ‘order by’ on the name, and you can do the rest of your work in code.