Home > Back-end >  JSP to connect mysql and output
JSP to connect mysql and output

Time:12-15

Save, the code



<%
The ResultSet RS_result=connDbBean. ExecuteQuery (" select equipmentnumber from equipment table ");
String equipmentnumber="";




int i=0;
While (RS_result. Next ()) {
Equipmentnumber equipmentnumber=RS_result. Get string (" ");

% & gt;







<% %=equipmentnumber & gt;
This major is a JSP query mysql tables in the database, and then the output result, why I only line of output, the output of the other in another place, I would like to ask how to make all of the data line filling in the form of output,

CodePudding user response:

You of the line to be continuously dynamic and

<% %=equipmentnumber & gt;



Otherwise the last line is the data set of data to demonstrate

CodePudding user response:

Upstairs right, add a loop to td tags, cycle number for the number

CodePudding user response:

Don't write functional code in a HTML interface, especially the database connection parts
  • Related