| Schalk 2005-08-31, 1:23 pm |
| Greetings All
I have two tables, ab.comp_results and ab.competitions. I want to
execute a select query and JOIN these two tables. This is easy enough
but, here is my problem.
QUERY:
SELECT CR.pos, CR.member_name, CR.comp_img, CR.competition, C.town,
C.comp_name, C.comp_date FROM ab_comp_results CR, ab_competitions C " +
"WHERE cup = '" + request.getParameter("cup") + "' AND CR.competition =
'" + request.getParameter("comp") + "' AND sex = 'Female'";
Seeing that CR.competition has to first match the requestParameter, how
do I go about JOINing these two tables ON CR.competition and C.comp_name
based on the value of request.getParameter("comp")? The reason I want to
JOIN these two tables is so that I do not have to duplicate the town and
comp_date values inside of the ab.comp_results table.
Any help, ideas or pointers are welcome. Thanks!
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers
--
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe: http://lists.mysql.com/java?unsub=m...sie.nctu.edu.tw
|