Do you have a question? Post it now! No Registration Necessary. Now with pictures!
April 28, 2006, 7:37 pm
rate this thread
s.student_ethnicity_interest_other != '', " .
" CONCAT(s.student_ethnicity_interest_other, ', ',
GROUP_CONCAT(e.ethnicity_name ORDER BY upper(e.ethnicity_name))), " .
' GROUP_CONCAT(e.ethnicity_name ORDER BY
" ) AS ethnicity_name \n\n";
This segment of a larger SQL query produces a string that normally
looks like these:
Here's the problem. Requirement states that we now need to filter the
results by "ethnicity", which is a one-to-many relationship per
Let's say you have 20 applicants, and out of those, 1 of those has just
"caucasians" for ethnicity.
When you do the filter which I envision as:
WHERE ... AND ethnicity_name LIKE '%caucasians%'
Instead of having this value in the $result[$i]->ethnicity_name field
You see this:
Take out the filter and it displays just fine.
I am not sure how much more info I can provide; the query itself is
about 200 lines long and is under U.S. Government regulated security
(illegal to post it, sorry), unfortunately this is all I can think of
that is allowable to post that illustrates the problem.
Should note there there is an "ethnicity" table with 7 rows in it with
unique ethnicity names like "caucasians", "african-americans", etc.,
and a field in the "applicant" table that is
"applicant_ethnicity_interest_other" where you can enter whatever
ethnicity you want on top of the selected ethnicities in the
"ethnicity" table - if that helps.
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum