Jump to content

makaiser

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

makaiser's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I think I'm making this to difficult, I really don't need to know which items didn't make it through, rather just that something is stuck. $query = "SELECT * FROM store_soap_queue WHERE done != 1 AND started <= NOW(),- INTERVAL 10 MINUTE"; $results = @mysql_query($query); if($results){ $notify = print "An order didn't go through"; $mailaddress = "123@abc.com"; $mailsubject = "Unfinished business in queue!"; $mailbody = $notify; mail($mailaddress,$mailsubject,$mailbody); } else{ print "Nothing stuck in queue \n"; } what do you think?
  2. OK, new to this forum, struggling with something here. All I'm after is a simple php/mysql script that checks to make sure something isn't stuck in the queue, and if there is something stuck, to send a mail off. Currently what I've started with. $query = "SELECT orderid FROM store_soap_queue WHERE done != 1 AND started >= SUBDATE(NOW(), INTERVAL 10 MINUTE)"; $results = @mysql_query($query); if($results){ $orderid = array(); while($row = @mysql_fetch_array($results)){ $orderid[] = $row['orderid']; } $notify = print "The order ID that didn't go thru: $orderid at [".date('Y-m-d h:i:sa')."]"; $mailaddress = "name@addresswhatever.com"; $mailsubject = "Stuff still in queue"; $mailbody = $notify; mail($mailaddress,$mailsubject,$mailbody); } I know I'm probably messing something up with the subdate() function. But I could be off, and am not the brightest star in the sky when it comes to mysql/php.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.