-
URL Rewritting
In a jsp file i have the following code
<TR>
<TD>" + result.getString(2) </TD>
<TD>" + result.getString(3) </TD>
<TD>" + result.getString(4) </TD>
<TD><a href=Comment?reviewid =" + reviewid + ">Add a comment</a></TD>
</TR>
In a sql i have a table with reviewID, movieTitle, review, commentID
I want to be able to link a comment with a review. So i put the reviewID in the url and the url links to a comment.
the servlet is used to display the comment but the commend is linked to all the reviews not a single one when i do it, the code i used to display is
String query = "SELECT M.reviewID, M.movieTitle, M.review" + " FROM movie AS M";
result = stmt.executeQuery(query);
Can anyone help me correct this.
-
The select statement you use here will retrieve all records in the movie table,
it has no where clause, I assume that the passed reviewID shall go into that clause.
eschew obfuscation
Similar Threads
-
By John Butler in forum ASP.NET
Replies: 0
Last Post: 11-26-2002, 03:53 PM
-
By Aram Bohdjelian in forum Mobile
Replies: 0
Last Post: 07-31-2002, 05:17 PM
-
By gvt in forum VB Classic
Replies: 0
Last Post: 02-07-2001, 08:47 AM
-
By gvt in forum VB Classic
Replies: 0
Last Post: 02-07-2001, 08:47 AM
-
Replies: 0
Last Post: 08-07-2000, 12:11 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks