March 28th, 2013, 02:10 PM
Plays with fire
Join Date: Aug 2003
Location: Outside looking in
Like to have 1 row returned with lookup table
Building a login system and would like to have one row returned with a person's name and access groups. My tables:
What I'd like returned is a person's name, group name, and all the menu_key(s) that person has ... all in one row.
is this a job for a subquery? Seems like a join would be faster here.
I've gotten this far:
concat(admin_people.fname," ",admin_people.lname) as fullname,
inner join admin_creds on admin_creds.people_key=admin_people.pkey
It returns the data I want, but now how I want. Any help is seriously appreciated.
“Be ashamed to die until you have won some victory for humanity.” -- Horace Mann
"...all men are created equal." -- US Declaration of Independence