Kindly please anyone here helps me how to check in my program,
i want to insert this SQL query to jsp file:
SELECT COUNT(id) new
FROM annaudio
WHERE id NOT IN (
SELECT annaudio_id FROM annread WHERE annuser_id=1
)
and this is my jsp file's script:
<%
Class.forName ("org.gjt.mm.mysql.Driver");
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/ann?user=root");
Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery("SELECT COUNT(id) FROM annaudio WHERE id NOT IN(SELECT annaudio_id FROM annread WHERE annuser_id=" + "iduser)");
out.println(rs);
%>
My problem is how to display my "ResultSet"??