I have a database in MYSQL where one of the fields tells the status of a particular transaction. For example: status = waiting or status = full.
I want to do a cron that every 10 minutes takes all the clients that have the status = complete and I want to post the data returned to another URL, I'll use the same data in another application. I'm going to use Guzzle to send this data, but I still do not know how to make the request.
To avoid sending the duplicate data, I have the following information in the table, processed = 0, so I send the POST and I have a return code 200, I update the information to processed = 1, so the query needs fetch data with status = full and processed = 0
I imagine I can do this with foreach, but in some tests here it did not work!