tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Wun" <swun2...@gmail.com>
Subject Re: Problem with Displaying Result of a MySQL Join in Tomcat
Date Sun, 03 Aug 2008 03:53:08 GMT
why not use Linux?


On Sun, Aug 3, 2008 at 10:02 AM, Glyn Thomas <glynthomas@comcast.net> wrote:
> I am in the process of converting a Tomcat front end for a MySQL database
> from
>
> Windows XP to Windows Vista.
>
>
>
> The XP version used MySQL Version 5.0.22, Tomcat 5.5.20, JRE 1.5.0 release
>
> 12 with Tomcat JDK 4 Compatibility Pack, and J/Connector 5.0.6.
>
>
>
> The Vista version is using MySQL Version 5.0.51a, Tomcat 5.5.26, JRE
>
> 1.6.0_05, and J/Connector 5.1.6.
>
>
>
> I am unable to display any parts of a result set that are retrieved from
>
> JOINed tables in the Vista version - this works fine in the XP version.  I
>
> already tried converting the queries to use JOIN syntax instead of WHERE
>
> syntax, without improvement.
>
>
>
> For example, this query works correctly in the MySQL command line:
>
>
>
> SELECT
>
> i.ImageID,i.DateDay,i.DateMonth,i.DateYear,i.Location1,i.Location2,i.Scanned
>
> YN,i.MediaID,c.Description as 'Country', s.SubjectID, s.SubjectTypeID,
>
> i.CountryID,i.PhotographerID, i.VolumeNumber FROM image_tbl i JOIN
>
> lu_country_tbl c ON (i.countryid=c.countryid) JOIN xrf_image_subject_tbl si
>
> ON (si.Imageid=i.imageid) JOIN subject_tbl s ON (si.Subjectid=s.subjectid)
>
> WHERE (i.imageid=1234);
>
>
>
> In JSP, I retrieve the results of this query into an rsImages variable, and
>
> then iterate through the rows using:
>
>
>
> <c:forEach var="row" items="${rsImage.rows}">
>
>
>
> Rows that retrieve directly from the image_tbl work correctly e.g.
>
> ${row.ImageID} will display the image ID.
>
>
>
> However, elements from the joined tables, such as ${row.Country} and
>
> ${row.SubjectID} don't get retrieved.
>
>
>
> Any ideas?
>
>
>
> Thanks,
>
> Glyn Thomas
>
>
>
>
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message