DA Drop down references another table - won't reverse reference...
I am building a tool to track some my characters for an MMORPG.
I have a table that contains every spell for every class (spell) containing:
spell_id
spell_name
spell_class_id
spell_level
I also have a table that contains every class:
class_id
class_name
In the DA wizard for the spell table, I used the class table to make a drop down menu for searching (there are no update or insert screens for the spell table, that happens via database insert).
The issue I am having is getting class.class_id to relate to spell.spell_class_id in the original lookup. Right now, the URL shows (||||| just to show where the call is...)
spell_Results.php?S_spell_name=&S_spell_level=&|||||S_spell_class=9|||||&Search.x=36&Search.y=4&Search=Search
I believe (S_spell_class) relates to class.class_id (according to the wizard settings) and I need (S_spell_class) to some how reference spell.spell_class_id...
If I search using any of the other criteria, I get the appropriate result and details pages, and the INNER JOIN statement works just fine for displaying, just not for the original search/query...
Here is the SELECT statement from the results page (which works to display the search results...)
SELECT
spell.spell_class_id,
spell.spell_name,
class.class_name,
spell.spell_level,
class.class_id
FROM
spell
INNER JOIN class ON spell.spell_class_id = class.class_id
Thoughts?