Hi, Im trying to develop a solution where I have orders and the default status is on hold, all this orders need to be an invoice, so I design a grid where now I have all orders, but the idea is to show just one per time, and when it changes from on hold to invoice I will be able to see another order.
Hope someone already worked with someting similar
Hi
set an order by clause by status and date/hour in your query, and select only the first row
SELECT * FROM mi_tabla
ORDER BY columna_orden DESC
LIMIT 1;
Why not see all orders and and a column with the status and the invoice number?
bye.
1 Like
The users don’t have to be able to choose what order do first, so they have to change the status to proceed
A simple WHERE filter solve the problem
SELECT TOP 1 FROM mi_tabla
WHERE status = ‘on hold’
ORDER BY …
1 Like
Yes but how can I manage to have the next one display on my grid after the former one change status
If the status changed, when you refresh the grid will show the next Top 1 record. Regards
1 Like