dynamically created links id from mysql table is not getting

 
 

Share on Google+Share on Google+

jopsy kurien
dynamically created links id from mysql table is not getting
0 Answer(s)      3 years and 11 months ago
Posted in : JSP-Servlet

guys, i'm trying to access dynamically called attributes from mysql table as a link to another page, but while i'm trying to access its value, i'm getting only the last attribute from the table. below is my code

<%@page contentType="text/html" pageEncoding="UTF-8"%>

JSP Page

Cinema Forums

<%@page language="java"%> <%@ page import="java.sql.*" %> <%@ page import="java.sql.DriverManager.*" %> <% String dbname="cinemaforums"; String db_url="jdbc:mysql://localhost/cinemaforums"; Connection con; ResultSet rs= null; try{ Class.forName("com.mysql.jdbc.Driver"); con=DriverManager.getConnection(db_url,"root","root"); Statement st=con.createStatement(); String s="select * from malayalamcinema"; rs=st.executeQuery(s); %> <% while(rs.next()) { String str=rs.getString("threads"); session.setAttribute( "sess",str ); String str1=rs.getString("replies/views"); String str2=rs.getString("lastpost"); String str3=rs.getString("posts"); %> <% }%>
threadsreplies/viewspostslast post
<% out.println(str);%> <% out.println(str1); %> <% out.println(str3);%> <% out.println(str2);%>
<% } catch(SQLException e) { e.printStackTrace(); } catch(Exception ex) { ex.printStackTrace(); } %>
</body>

i'm only getting the last recordset from table malayalamcinema, plz help me, its urgent

Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
dynamically created links id from mysql table is not getting
dynamically created links id from mysql table is not getting  guys, i'm trying to access dynamically called attributes from mysql table as a link... only getting the last recordset from table malayalamcinema, plz help me, its
getting result in table dynamically - Struts
getting result in table dynamically  How do i get result in tabular format dynamically using our own tags
Advertisements
Getting mysql table in textbox
Getting mysql table in textbox  how to get mysql table values into textbox in java using ajax and servlets
create table in mysql of split file created in java
create table in mysql of split file created in java  i have created splite file in java. now i want to create table from splited data how to do
Retrieve database from the table dynamically in jsp from oracle using servlet
Retrieve database from the table dynamically in jsp from oracle using servlet  Sir, I have created a table in oracle using eclipse, and added few columns dynamically. I want to retrieve the table with all columns dynamically
how to retreive data dynamically from mysql to drop down list
how to retreive data dynamically from mysql to drop down list   sir, i created a table in mysql and i inserted some values into the table through... the data of a particular column in a table into drop down list dynamically
Mysql From Table
Mysql From Table       Mysql From Table is used to specify the table from which the records is retrieved. Understand with Example The Tutorial illustrate an exanple from 'Mysql From
mysql select into table from another table example
mysql select into table from another table example  Can you suggest the correct example of select into table from another table example in MySQL... from one table into another table. Check the example at MySQLselect into new
deleting all records from a table in mysql
deleting all records from a table in mysql  Hi, I am finding code for deleting all records from a table in mysql. How to delete all rows in mysql...; This will delete all the records from the table. But if you are using auto
Accessing dynamically created variables inside a function
Accessing dynamically created variables inside a function  Hi, I'm... to set a variable dynamically like so: $pid = $GET['p_id']; This part goes...=$_SERVER['REMOTE_ADDR']; $p_id = **$p_id;** ..... $query = mysql
fetch record from MYsql table query
fetch record from MYsql table query  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have to retrieve these data from the field table
Server side validation on dynamically generated fields from more than one table on spring framework.
Server side validation on dynamically generated fields from more than one table on spring framework.   Server side validation on dynamically generated fields from more than one table in spring mvc framework
HTML & MYSQL - retrieve record from table
HTML & MYSQL - retrieve record from table  Hi. I have a field...,trichy,kanchipuram for a single record. I have to retrieve these data from the field table. Actually they are separated by comma. I want to take the values as single
MYSQL retrieve record from Data table
MYSQL retrieve record from Data table  Hi. I have a field in database...,kanchipuram for a single record. I have to retrieve these data from the field table. Actually they are separated by comma. I want to take the values as single
How to import data from sql server table into an excel file by creating the rows dynamically in the excel according to the dataabase??
How to import data from sql server table into an excel file by creating the rows dynamically in the excel according to the dataabase??  How to import data from sql server table into an excel file by creating the rows dynamically
how to validate values in the dynamically created textboxes?
how to validate values in the dynamically created textboxes?  how to validate values in the dynamically created textboxes in HTML using javascript...;table id="tableId" border="1"> <tr> <td colspan="2">
dynamic retrivel of data from mysql database in table format at jsp
dynamic retrivel of data from mysql database in table format at jsp  ... the data from database and display it as table format in jsp... For example, i have created database with fields lik groups,membername ,amount and so on.... let
Mysql Alter Table Identity
an example from 'Mysql Alter Table Identity'. To understand and elaborate an example... Mysql Alter Table Identity       Mysql Alter Table Identity is used to change the existing structure
how to count unique and duplicate values from one table in mysql?
how to count unique and duplicate values from one table in mysql?  I have use EMP table.I want to count unique and duplicate records from emp table and how to use in java program
MySQL Generate AlphaNumberic Id In JSP
MySQL Generate AlphaNumberic Id In JSP In this section we will discus about how to generate id in specific format in MySQL and JSP. This example explains you that how to generate alpha numeric id in MySQL and also how to fetch
getting coords from an image.
getting coords from an image.  how to get coordinates dynamically(in run time) from an image?? pls help me
JavaScript add row dynamically to table
JavaScript add row dynamically to table  ... to add row to a table dynamically then we can also do this with the JavaScript code. In this example we will describe you how to add row dynamically to the table
Getting the last inserted id using jsp
Getting the last inserted id using jsp  Pls how can i retrieve the last inserted id after submitting a form to mysql using jsp
redirect to multiple links from servlet
redirect to multiple links from servlet  hello , In my servlet page , i'm using response.redirect("www.somewebsiteaddress.com"); after it shows... want redirect to multiple links simultaneously. anyone help me out
How to use next and previous button(or href) for database table that is retrieved from MySQL DB using jsp,jstl,javascript
that is retrieved from MySQL DB using jsp,jstl,javascript  when click on the next... to display previous 10records. Database Query like this: Select * from table_name where id=..; database:mysql technology:jsp,servlet,javascript,jstl  
To dump 10lakh lines from a text file to a mysql table
To dump 10lakh lines from a text file to a mysql table  I need to dump a text file datas -100000 lines into a mysql table.i'm able to dump only 152000 lines only
Mysql From
Mysql From       Mysql From specify the table from which records is retrieved. Understand with Example The Tutorial illustrate an example from 'Mysql From'. To understand
how to display data from mysql table in text box using jsp??
how to display data from mysql table in text box using jsp??  <p>hi, i have a written a code to display data from a mysql table into txtboxes..But i am getting the following error...</p> <p>An error occurred
How to Validate dynamically created text box in HTML using Javascript
How to Validate dynamically created text box in HTML using Javascript  Here is the HTML code to create text boxes dynamically. It works properly.... And also how to validate the text boxes created dynamically. <html>
How to change the data in the table dynamically ?
How to change the data in the table dynamically ?  This is my code. I... then the data displayed in the table below should get sorted dynamically in this jsp page... datastore = DatastoreServiceFactory.getDatastoreService(); Query q = new Query
Hoe to refresh a table row dynamically
Hoe to refresh a table row dynamically  Want to refresh a table data... Friend, Is there a link attribute with every row of a table through which we will able to refresh a particular table row? Please clarify this. Thanks

Ads

 
Advertisement null

Ads