Very simplistic but I am utterly STUMPED at this one.
I have a db table "person" that I can sort by title, first_name,
last_name, or city with no problems at all because "title",
"first_name ", "last_name" , and "city" are columns in the table.
The requirement is to ALSO sort by department NAME. Problem is, I
can't do that in the "person" table because the column is
"department _id" which is a foreign key constraint to the department
table.
How do I sort the person records by department_name based on this?
I am using PHP 4.3.2 and MySQL 4.0.10
Now, second problem and even more of a problem:
The requirement is to ALSO sort by state NAME and country NAME. The
fields "state" and "country" in the "person" table contain only an
abbreviation of state and country; the corresponding full name of each
state and country are found in respective XML files in /xml/state.xml
and /xml/country.xml
So, NOW... how do I sort?
Thanx
Phil
I have a db table "person" that I can sort by title, first_name,
last_name, or city with no problems at all because "title",
"first_name ", "last_name" , and "city" are columns in the table.
The requirement is to ALSO sort by department NAME. Problem is, I
can't do that in the "person" table because the column is
"department _id" which is a foreign key constraint to the department
table.
How do I sort the person records by department_name based on this?
I am using PHP 4.3.2 and MySQL 4.0.10
Now, second problem and even more of a problem:
The requirement is to ALSO sort by state NAME and country NAME. The
fields "state" and "country" in the "person" table contain only an
abbreviation of state and country; the corresponding full name of each
state and country are found in respective XML files in /xml/state.xml
and /xml/country.xml
So, NOW... how do I sort?
Thanx
Phil
Comment