Peruttu

eMail "Distinct" results of MySQL query

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 "[url removed, login to view]";

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/[url removed, login to view]";

$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));

Taidot: HTML, MySQL, PHP

Näytä lisää: email csv file mysql query, drill results mysql query, display results mysql query, script mysql query csv file email, mysql query results date range php, mysql query display results csv file, perl mysql query results email, mysql query range results, displaying results mysql query, perl mysql query result email, perl crontab mysql query result email, perl reading mysql query results, mysql query send email, perl mysql query email, google map mysql query results

Tietoa työnantajasta:
( 27 arvostelua ) Ashland, United States

Projektin tunnus: #16483737

21 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön

rinsadsl

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 3 päivässä
(950 arvostelua)
8.6
$147 USD 3 päivässä
(588 arvostelua)
8.9
Shopify

Hello, Dear client we have checked your project [ ] We can provide you an appealing, professional and RESPONSIVE website with functional tabs, attractive/revolution slider banners, modern layout and design of pages. Lisää

$155 USD 3 päivässä
(29 arvostelua)
7.1
abstractsoftweb

[login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] Lisää

$155 USD 3 päivässä
(98 arvostelua)
7.1
mahamadali

A proposal has not yet been provided

$83 USD 1 päivässä
(159 arvostelua)
6.5
efforcoder

Hi, sir. Thanks for reviewing my proposal. I have seen your project very carefully. I am sure I can do your work asap. I have been developing web application for 5 years. PHP, MYSQL are my major skills. These are Lisää

$155 USD 3 päivässä
(29 arvostelua)
5.7
riteshjainindore

Dear revered, I hope you are doing good. I am a professional PHP developer with an experience of more than 5 years in creating and customizing PHP based websites, themes and plugins/modules. I am well equipped Lisää

$155 USD 3 päivässä
(8 arvostelua)
5.4
DigitalRace

Hi, Dear Client! I am very good at this area and it is piece of cake for me. I can do it perfectly as per your want and can be strict in time. Looking forward to hearing from you soon.

$155 USD 3 päivässä
(20 arvostelua)
4.9
$100 USD 1 päivässä
(56 arvostelua)
5.1
bjrupani

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 y Lisää

$111 USD 0 päivässä
(26 arvostelua)
4.5
$155 USD 3 päivässä
(23 arvostelua)
4.3
$35 USD 0 päivässä
(30 arvostelua)
4.0
fsdsolutions1

Hi I have reviewed your requirements for your preconceived project As all your requirements are crystal clear to me so i would like to discuss your project querries in more detail which would let me to quote y Lisää

$155 USD 3 päivässä
(1 arvostelu)
3.3
saikatkundued

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 3 päivässä
(6 arvostelua)
3.4
ankitshow9

A proposal has not yet been provided

$88 USD 3 päivässä
(2 arvostelua)
3.3
$244 USD 3 päivässä
(2 arvostelua)
2.7
DnyaneshwerK24

We can start immediately, Dear Hiring Manager, Hope you are doing well I have gone through your project description i can do that you mentioned in description We have huge experience of website design, mobile ap Lisää

$155 USD 3 päivässä
(4 arvostelua)
2.2
fastwebsoft

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 1 päivässä
(3 arvostelua)
1.8
$200 USD 5 päivässä
(0 arvostelua)
0.0
deeptisangwar5

Hello, I have gone thoroughly your requirement and i understand the your requirement as you stated .I will work on your website from landing page to make complete website for your consideration. I will Create Eye-catc Lisää

$155 USD 3 päivässä
(0 arvostelua)
0.0