vendredi 22 février 2019

Fetching data from a Database.mv file within a webserver

I am having trouble retrieving data from the database in the way I would like. I have created both a String array to store the product id reference and an int array to store the number of times the link to that product has been clicked.

I would like the for loop to loop through all the products stored in the database and then display them on the webpage in order of the amount of times users have clicked on that product. The screenshots below should clarify.

Code for adding new products

Code for arrays

For loop to execute

HTML code to display each product

For anybody wondering I have to use this webserver and will provide the Github link if required.




Aucun commentaire:

Enregistrer un commentaire