Restaurants

<% String Nom = ""; String img =""; String description =""; String adresse =""; String id=""; int telephone = 0 ; int idagence=0; try{ Class.forName("com.mysql.jdbc.Driver"); String req = "select * from restaurant "; // connection base Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/guidegate?autoReconnect=true&useSSL=false","root","admin"); // bibliotheque pour executer les requetes Statement stt = con.createStatement(); //execution requete ResultSet rs=stt.executeQuery(req); while(rs.next()){ Nom = rs.getString(2); img=rs.getString(6); adresse=rs.getString(3); id=rs.getString(1); telephone = rs.getInt(4); description = rs.getString(5); idagence=rs.getInt(7); %>
<% String nom=""; String requet = "select * from agence where idagence="+idagence; // connection base Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/guidegate?autoReconnect=true&useSSL=false","root","admin"); // bibliotheque pour executer les requetes Statement sttt = conn.createStatement(); //execution requete ResultSet rs1=sttt.executeQuery(requet); while(rs1.next()){ nom = rs1.getString(2); } %>

<%=Nom %>

Agence : <%=nom%>



<%= adresse %>
Decouvrir

<%} } catch(Exception e){ System.out.print(e.toString()); } %>