Find Jobs
Hire Freelancers

eMail "Distinct" results of MySQL query

$30-250 USD

Cancelled
Posted about 6 years ago

$30-250 USD

Paid on delivery
I need modifications/additions to the PHP code below that will accomplish two goals: (1) eMail a list of all unique "TransferDate" values that are in records that will be deprecated when the "$deadify_stmt->execute()" is run. (2) Although the DBRStatus value is being modified correctly as a result of this script, DBRDeadDate is not being set. I need the correction to my code to fix that. ====================================== Here are the relevant snips of my PHP code (it works other than setting the DBRDeadDate): <?php error_reporting(E_ALL); ini_set('display_errors', 1); include "[login to view URL]"; date_default_timezone_set('America/New_York'); /// Define comparison rules for determining which data lines need to be deprecated $deadify = "UPDATE DBRData SET DBRStatus = 'Dead', DBRDeadDate=Now() WHERE ( ((ChargeID,FolioID,Rstatus,CheckIn,CheckOut,CustomerID,FirstName,LastName,Address,City,State,PostalCode,Phone,TransferType,TransferDate,Item,Description,Quantity,Rate,Price,Discount,Channel,RateType,ChannelNotes,UserNotes,CreateBy,CreateDate,ModifyBy,ModifyDate) NOT IN (SELECT ChargeID,FolioID,Rstatus,CheckIn,CheckOut,CustomerID,FirstName,LastName,Address,City,State,PostalCode,Phone,TransferType,TransferDate,Item,Description,Quantity,Rate,Price,Discount,Channel,RateType,ChannelNotes,UserNotes,CreateBy,CreateDate,ModifyBy,ModifyDate FROM ImportCSV)) AND FolioID IN (SELECT DISTINCT FolioId FROM ImportCSV AS FolioID ORDER BY FolioID) AND FolioID != 0 AND TransferDate > (SELECT min(TransferDate) FROM ImportCSV) AND DBRStatus = 'Active' )"; /// TODO: Add eMail scripting here /// Run deadify/deprecation routine on records $deadify_stmt = $pdo->prepare($deadify); $deadify_stmt->execute() or die(print_r($insert->errorInfo(), true)); $deadify_count = $deadify_stmt->rowCount(); $fileName = "../../data/[login to view URL]"; $fileDate=date ("Y-m-d H:i:s.", filemtime($fileName)); $imported = "UPDATE Resync SET Deadified = $deadify_count WHERE Fdate = '$fileDate'"; $imported_stmt = $pdo->prepare($imported); $imported_stmt->execute() or die(print_r($insert->errorInfo(), true));
Project ID: 16483737

About the project

15 proposals
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
15 freelancers are bidding on average $129 USD for this job
User Avatar
Hi, I can fix this email related code and do the DBRDeadDate issue as well. Award with confidence, I can do a great job to you
$222 USD in 3 days
4.8 (1199 reviews)
9.3
9.3
User Avatar
A proposal has not yet been provided
$83 USD in 1 day
5.0 (627 reviews)
8.0
8.0
User Avatar
Hello hiring member i am bhavika i can fix this i have good experience with php html,css,ajax,jquery ,javascript i have done this types of job in my past so you can trust in my skill so please give me chance to serve you thanks in advance see you soon :)
$111 USD in 0 day
5.0 (260 reviews)
7.8
7.8
User Avatar
hello sir, I have read your requirement carefully. I can do within few hour.. so I am perfect candidate for this job at lowest rate witth sure result. thanks
$35 USD in 1 day
4.8 (37 reviews)
6.5
6.5
User Avatar
I read your proposal and understand your need sir.. I can do this project as I have already done this type of job..Want to work with you...
$100 USD in 3 days
4.9 (15 reviews)
5.0
5.0
User Avatar
A proposal has not yet been provided
$88 USD in 3 days
4.9 (2 reviews)
3.3
3.3

About the client

Flag of UNITED STATES
Dubois, United States
5.0
36
Payment method verified
Member since Oct 6, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.