Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/19/2022 in all areas

  1. Are you sure you're getting results from your query? Your query/code doesn't make a whole lot of sense anyway. Your querying for records where SubRenew = 30, and the only data you're using as a result of that query is the SubRenew column which is guaranteed to be 30 at that point so why bother?
    1 point
  2. Look at the cleaned up block of your code loop; foreach ($result as $row) { $mail->addAddress('james@jhe.co.uk', 'James Coates'); $mail->Body("This subscription is expiring on" . $row['subRenew']); $mail->send(); // DROP THIS LINE!!! if (!$mail->Send()) echo 'Something went wrong'; else echo 'Mail sent to somebody Complete.'; //Clear all addresses and attachments for the next iteration $mail->clearAddresses(); $mail->clearAttachments(); } As you can see you were doing the send (?) twice although function names are different. Secondly - where are you using the results of your query loop? I see a static address but nothing from your loop.
    1 point
  3. The purpose of that is to change a date string (eg '19-04-2022') which is in %d-%m-%Y format to a correct DATE format. RTFM - https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_str-to-date
    0 points
This leaderboard is set to New York/GMT-04:00
×
×
  • 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.