in reply to Re^2: continuously query
in thread continuously query

This looks like total bullshit.

Your DB looks like:

userid ordernumber status created 1 455678 PAID 2020-12-31 23:59:59 2 344666 NOTPAID 2020-12-08 23:59:59 3 788997 PAID 2020-12-01 23:59:59
Show us the code that prints that SQL DB table.
ADDED: Show how you get the status for the order number?

You need to learn Perl, SQL and web page lingo and that combination is not working. Start one step at a time.