|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-06-27 23:01 UTC] sniper@php.net
[2001-06-28 13:02 UTC] sniper@php.net
[2001-07-27 10:48 UTC] kalowsky@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 16:00:01 2025 UTC |
<?php // goods.php $today = date("Y/m/d"); $mmdd = substr($today, 5, 2) . substr($today, 8, 2) . ".txt"; $cmdstr = "php.exe -q goods1.php " . $today . " " . "2001/06/14/11:37:05" . " > Y:\AutoDialer_MKT\REPORT\Pattaya\goods1_" . $mmdd; echo $cmdstr . "\n"; system($cmdstr); $cmdstr = "php.exe -q goods2.php " . $today . " " . "2001/06/14/11:37:05" . " > Y:\AutoDialer_MKT\REPORT\Pattaya\goods2_" . $mmdd; echo $cmdstr . "\n"; system($cmdstr); ?> <?php # # goods1.php # function generate_goods1_report($datestr, $camid) { $linkid = odbc_connect("FET", "SA", ""); if ($linkid) { $sqlstr = "SELECT REP.CALL_DATE, REP.CUS_TELNO1, REP.FIRST_NAME, REP.RFU1 FROM REP_CM00001 REP" . " WHERE CAMPAIGN_ID = '" . $camid . "'" . " AND RFU1='1' AND CALL_DATE = '" . $datestr . "'"; $cur = odbc_exec($linkid, $sqlstr); print "CALL_DATE,CUS_TELNO1,FIRST_NAME,RFU1\n"; while (odbc_fetch_row($cur)) { $field1 = odbc_result($cur, 1); $field2 = odbc_result($cur, 2); $field3 = odbc_result($cur, 3); $field4 = odbc_result($cur, 4); $datastr = $field1 . "," . $field2 . "," . $field3 . "," . $field4 . "\n"; print $datastr; } odbc_close($linkid); } } // function // echo "Into goods1.php\n"; // echo "argc == " . $argc . "\n"; if ($argc == 3) { generate_goods1_report($argv[1], $argv[2]); } else { echo "Usage : php.exe -q goods1.php call_date(YYYY/MM/DD) campaign_id\n"; } ?>