10-09-2007, 11:57 AM
|
#21 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
Create a vocations table with columns such as id, name, description which you can add rows for each of the available vocations. You can then search the players table for players by vocation name by JOINing the vocations table.
Code:
-- Example query to fetch players who are 'knights'
SELECT p.*
FROM players p
LEFT JOIN vocation v ON v.id = p.vocation
WHERE v.name = 'knight'
|
|
|
|