How to display data from a query by specifying the records in java [closed]

0

What I want is that when you select the client of the table you will be shown all the purchases made by that client in a table and that when you search for a date, for example, only the records of that client appear and not of all

    
asked by Jeredick Escobar 26.04.2018 в 21:26
source

1 answer

1

In several projects that I have worked on, I had to do this.

  • create an object with all the parameters that exist in the database, for example: Persona(id, nombre, apellido, compra)

  • create a list of objects such as ArrayList or Map to save the object "person"

  • popularize the list by doing a search query SELECT compra FROM transacciones WHERE id = "usuario" and saving it in the list with a command like .add()

  • 4.- make a method that shows only transactions to your liking as getTransaccionPorFecha(fecha) or getTransaccionPorPrecio()

    I hope this serves you jeredick. Please be more specific in your next questions to be able to help you more in detail.

        
    answered by 26.04.2018 в 23:52