Results 1 to 4 of 4
Thread: Help with query (new to java!)
- 02-14-2009, 05:07 PM #1
Member
- Join Date
- Feb 2009
- Posts
- 1
- Rep Power
- 0
Help with query (new to java!)
i have a form. its populated with a specific field from a mysql using java this is the code for the first page.
<c:forEach var="parish" items="${parish.rows}">
<option value="${parish.id}">${parish.ParishName}</option>
</c:forEach>
</select><br><input type="submit" value="submit" name="submit" /></form></td>
on the second page i would like to call a the row that was selected in the dropdown box here is what i have so far:
<sql:query var="parish" maxRows="1" dataSource="jdbc/gav">
SELECT ParishName, OwnerOccupierHousehold, OwnerOccupierPercOfOverall, OwnerOccupierCo2Emissions,
SocialRentedHousehold, SocialRentedPercOfOverall, SocialRentedCo2Emissions, PrivateRentedHousehold,
PrivateRentedPercOfOverall, PrivateRentedCo2Emission, TotalHouseholds, TotalPerc, Average,
Total2001, TotalEstimatedTotal2006, EmissionsPerPerson, EmissionPerHousehold, EmissionsPerParish,
EnergyChampionsNeeded, NumberOfPeopleAtWork, NumberOfSchoolAgeChildren
FROM base_data
<sql:param value="${param.id}"/>
</sql:query>
<c:set var="parish" scope="request" value="${parish.rows[0]}"/>
i know this is not correct cause i should add something after the "FROM base_data line but i am a bit stuck to what it is can someone set me straight be abusive as you wish after it should be quite simple!!
Thanks in advance
- 02-15-2009, 12:30 AM #2
Java Code:<sql:setDataSource dataSource="jdbc/gav" /> <sql:query var="parish" maxRows="1" sql="SELECT ParishName, OwnerOccupierHousehold, OwnerOccupierPercOfOverall, OwnerOccupierCo2Emissions, SocialRentedHousehold, SocialRentedPercOfOverall, SocialRentedCo2Emissions, PrivateRentedHousehold, PrivateRentedPercOfOverall, PrivateRentedCo2Emission, TotalHouseholds, TotalPerc, Average, Total2001, TotalEstimatedTotal2006, EmissionsPerPerson, EmissionPerHousehold, EmissionsPerParish, EnergyChampionsNeeded, NumberOfPeopleAtWork, NumberOfSchoolAgeChildren FROM base_data WHERE id=?" <sqlaram value="${param.id}"/> </sql:query> <c:set var="parish" scope="request" value="${parish.rows[0]}"/>
- 02-15-2009, 04:08 AM #3
Member
- Join Date
- Jan 2008
- Posts
- 31
- Rep Power
- 0
sorry not to talk java serjant
But if you give your photo a gamma correction of about 1.8 it will fix up the brightness, (and any other pictures that comes out of that camera) it seems that not a lot of people with electronic cameras know this.
- 02-15-2009, 09:14 AM #4
Similar Threads
-
Java Popup Window & Url Query String Value
By Rivelyn in forum New To JavaReplies: 4Last Post: 01-20-2011, 05:03 AM -
Iam getiing problem while running this this query in java
By satyaram in forum Java ServletReplies: 3Last Post: 02-17-2009, 02:30 PM -
Iam getiing problem while running this this query in java
By satyaram in forum Java ServletReplies: 0Last Post: 02-09-2009, 02:15 PM -
query on core java
By venkatallu in forum New To JavaReplies: 1Last Post: 09-01-2008, 02:23 PM -
Please Help - Java Date/Countdown Query
By desktop_doodle in forum New To JavaReplies: 2Last Post: 01-08-2008, 04:53 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks