I have two tables that I want to select from. The first is a list of characters, with the alignment saved as a character code i.e. LG.
The second table is a list of character codes and proper texts i.e. Lawful Good.
What I want to do is have the MySQL query cross reference these two things, and pass the long_name with the results, replacing the character code.
So that I don't have to do it in the PHP code instead.
Anyway, here is my feeble attempt at a query. I have something very wrong here I know. However, the online docs I've dug through have been very unhelpful to this point.
SELECT *
FROM char_master_list c(
SELECT long_name
FROM ref_align r
WHERE c.align = r.dc
)
ORDER BY name ASC
LIMIT 0 , 25
The second table is a list of character codes and proper texts i.e. Lawful Good.
What I want to do is have the MySQL query cross reference these two things, and pass the long_name with the results, replacing the character code.
So that I don't have to do it in the PHP code instead.
Anyway, here is my feeble attempt at a query. I have something very wrong here I know. However, the online docs I've dug through have been very unhelpful to this point.
SELECT *
FROM char_master_list c(
SELECT long_name
FROM ref_align r
WHERE c.align = r.dc
)
ORDER BY name ASC
LIMIT 0 , 25