<%@ page import="java.sql.*" %> <% Class.forName("org.gjt.mm.mysql.Driver"); Connection cn=DriverManager.getConnection( "jdbc:mysql://greeny.cs.tlu.ee/if14_jaagup_a", "if14", "ifikas2014"); Statement st=cn.createStatement(); ResultSet rs=st.executeQuery("SELECT regnr, mark FROM autod"); while(rs.next()){ out.println(rs.getString("regnr")+" - "+rs.getString("mark")+"
"); } //Kujundage tulemus HTMLi tabelina //Tabeli pealkirjareale vajutades sorditakse tulemus vastava veeru järgi %>