i m workin with jsp's

i am doing a project on online movie ticket booking system.
i encountered a problem when i started executing code for seat booking....
let me tell u my prob....

i m tryin to execute a query like this....

select s.seatno,'"+seat+"' from booking where s.screenid='101';

seat variable is a string which i got from a checkbox from the previous page...i.e.

<input type="checkbox" name="check" value="<%=sno%>">

i got the seat value from this,

String seat=request.getParameter("check");
out.println(seat);

when i print the value in "seat" i get a value as 's1' which is correct...
the value in "seat" i.e 's1' is one of the column names in my table...
i want to retrieve the data from dat column...
so i used this,

String showno=rst.getString("'"+seat+"'");

when i print the value in showno i m not gettin the data from the column....

i m still getting 's1' which is the column name...
but i want the data from the column...

------------------------------------------------------------------
plz do reply...
i hv been struggling with this since 2 weeks...

plz send me the code if suck kind of code exists...or else
send me any other different way to work with it....

too lazy to use capitals, code tags, and proper English?
No can do on helping you.

man... i explained it in the best way i could...
according to me i dont find any gramatical mistakes in my post...
i dont understand wat code tags u want...
i gave d code with absolutely no syntax errors...
including explanation abt y n how (of the values) .
i might have missed inserting quotes on one of the variables in my explanation section....

i might have confused u wid my explanation...

neways if u can still help me then
tell me if this works...

String showno=rst.getString("'"+seat+"'");

wat will be the value in 'showno'

<<=== points at shift key

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.