Click here to Skip to main content
15,891,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have saved the addresses of all the images into the MySQL database. Using query(JSP) I will get the src. But how can I show them in col-md-6 using the src? So how can I manage to show multiple images dynamically at the same time?

What I have tried:

String sql="SELECT * FROM customer_goods where gd_id ='"+ request.getParameter("gid")+"';";

In the customer_goods table, I have saved the image addresses, The problem How to show them?
Posted
Updated 24-May-18 20:23pm

1 solution

<div style="width:500; background-color:white; height:200px; overflow:scroll; overflow-x: scroll;overflow-y: hidden;">

<img style=" float:left; display:inline" src="images_news/imagex.gif" width="150" height="100" alt="not available" />
<img style=" float:left; display:inline" src="images_news/imagey.png" width="120" height="100" alt="not available" />
<img style=" float:left; display:inline" src="images_news/imagef.gif" width="150" height="100" alt="not available"/>
<img style=" float:left; display:inline" src="images_news/imagep.gif" width="150" height="100" alt="not available" />
<img style=" float:left; display:inline" src="images_news/imageq.jpg" width="160" height="100" alt="not available" />
<img style=" float:left; display:inline" src="images_news/imager.ico" width="200" height="100" alt="not available" />
</div>
 
Share this answer
 
Comments
Ashish Tupate 25-May-18 6:46am    
How do you did this? If image address is in the database and then how will I know the address of the image and count of the image? So maybe I have to use the table or something else. I dont know yet.
Member 13843821 26-May-18 1:26am    
If you are using a PHP than fetch no of rows in table than automatically you will get the no of image count and fetch address columns values and gives it to the image src=""
Ashish Tupate 28-May-18 5:23am    
I am using jsp here. How will the code like?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900