Results 1 to 2 of 2

Thread: JSP Question

  1. #1
    Join Date
    Mar 2008
    Posts
    1
    Rep Power
    0

    Default

    hey every to everybody i want the result in such way that frist four feilds in while loop and last one should print only one time ,how to do

    <%
    st11=con.createStatement();
    q11="select sr.subid,c.subject,c.units,z.cgpa from studentregdata sr, courses c, checkcgpa z where sr.sidno like'"+id+"' and sr.subid= c.subid and z.sidno=sr.sidno order by sr.subid";
    System.out.println(q11);
    rs11=st11.executeQuery(q11);
    while(rs11.next())
    {
    %>
    <tr>
    <td width="13%"><font face="Arial" style="font-size: 8pt; font-weight: 300"><center><%= rs11.getString(1)%></center></font></td>
    <td width="33%"><font face="Arial" style="font-size: 8pt; font-weight: 300"><%= rs11.getString(2)%></font></td>
    <td width="13%"><font face="Arial" style="font-size: 8pt; font-weight: 300"><center><%= rs11.getString(3)%></center></font></td>
    <td width="13%"><font face="Arial" style="font-size: 8pt; font-weight: 300"><center><%= rs11.getString(4)%></center></font></td>
    <td width="13%"><font face="Arial" style="font-size: 8pt; font-weight: 300"><center>5.49</center></font></td></tr>
    <%
    }
    rs11.close();
    st11.close();
    %>

  2. #2
    varunthecool is offline Member
    Join Date
    Jul 2007
    Location
    bangalore,india
    Posts
    19
    Rep Power
    0

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 09:49 AM
  2. Need help on this question
    By Deon in forum New To Java
    Replies: 3
    Last Post: 01-27-2008, 04:58 PM
  3. JNI question
    By javaplus in forum New To Java
    Replies: 0
    Last Post: 12-24-2007, 11:18 AM
  4. Need help with a question please
    By sonal in forum New To Java
    Replies: 1
    Last Post: 11-29-2007, 10:17 PM
  5. question about rmi
    By leonard in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 05:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •