santoshmotwani
asked on
Perl Script question
Hi Experts,
I have this perl script its runs fine. My query is how do email this output. I am not good with using arrays.
Here is my code.
All i want is to send output which i am getting via array in email.
I have this perl script its runs fine. My query is how do email this output. I am not good with using arrays.
Here is my code.
All i want is to send output which i am getting via array in email.
$query1 = $db4->prepare("SELECT COUNT (*), (
CASE WHEN PICSTATUS = '11' then 'Transfer Rejected'
when picstatus = '12' then 'Transfer Cancelled'
when picstatus = '20' then 'New Sale'
when picstatus = '70' then 'Pricing Accepted'
when picstatus = '72' then 'Sale Confirmed'
when picstatus = '80' then 'Ready for Transfer'
when picstatus = '90' then 'Transfer in progress'
end
) as STATUS FROM PROCONSUMER WHERE PICSTATUS NOT IN (100,10) GROUP BY PICSTATUS " );
$query1->execute;
while (@array = $query1->fetchrow_array)
{
print "$array[1] = $array[0]\n";
#($ca) = $array[2];
}
# email
my $subject = " Daily stats";
my $message = " Customer Statistics \n =======================================================================
";
`/usr/bin/sendEmail -f stats\@abc.com.au -t abc\@abc.com.au -u $subject -s localhost -m " $message \n " `;
print "email sent";
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thnx Mate !!!!!!!
ASKER
53 Transfer Rejected
How do i get transfer rejected first and then count?