Jump to content

mavveton12

New Members
  • Posts

    6
  • Joined

  • Last visited

mavveton12's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Im working on it, and i will let you know no need to be sarcastic
  2. Im not asking any body to write for me i just need some directions thats all! if have u have any please dont be shy
  3. Im trying to create a simple cron jobs file to send out an mail to accounts with low funds SELECT Account.accountId FROM Account, Account_Ad_Fund WHERE Account_Ad_Fund.amount < Account.adFundNotificationThreshold AND Account_Ad_Fund.accountId = Account.accountId // Find all accountIds with low funds and notification active // List all funds, by accountId // List fundnotificationdata by accountId I just need the right push what im trying to do next. how to write the code to perform this task, anybody im trying hade to learn php pleeease!!! im open for any solution foreach account if adfundnotificicationdata exists if adfund is lower than threshold && current notificationdata is higher than threshold sendmail... update notificationdata... else insert new data... */ } }
  4. Thanks man this was alot help man! iam trying to complete Cron job task to notify users about low ad funds Do u think i can complete it with your solution that u sent me public function adFundNotificationTask() { $SQL = array( 'findAdFundLowNotificationActive' => "SELECT a.accountId, a.publisherId FROM Account a WHERE a.adFundNotificationActive = true AND a.accountState in ('ACTIVE','ACTIVE_OBSERVATION')", 'findAdfundsByAccount' => "SELECT accountId, adFund FROM Account", 'findAdfunsNotificationData' => "SELECT accountId, amount FROM Account_Ad_Fund_Notification_Task", ); foreach($topLevelArray as $subArray){ if(!isset($subArray['arrayKeyToCheck'] || empty($subArray['arrayKeyToCheck'])){ runDataInsertFunction($subArray); } elseif(($subArray['nextKeyToCheck'] < $valueToCheckAgainst) && ($subArray['lastKeyToCheck'] > $valueToCheckAgainst)){ sendEmailFunction($subArray); } else{ runErrorFunction($errorDetails); } }
  5. Thanks man i will look into to it, I just need a little help, an example how you would write foreach for this example. I have just finished the sql query.
  6. How doi do this in php Please help foreach account if adfundnotificicationdata exists if adfund is lower than threshold && current notificationdata is higher than threshold sendmail... update notificationdata... else insert new data
×
×
  • 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.