In goods1.php  , the value of $argc == 5 (PHP 4.0.6)   , $argc == 3 (PHP
4.0.5)


-----Original Message-----
From: Bug Database [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 11:01 AM
To: [EMAIL PROTECTED]
Subject: Bug #11764 Updated: system() function result different from PHP
4.0.5


ID: 11764
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Scripting Engine problem
Operating system: 
PHP Version: 4.0.6
Assigned To: 
Comments:

And what is the difference between 4.0.5 system() and 4.0.6 system() ?



Previous Comments:
---------------------------------------------------------------------------

[2001-06-27 22:51:51] [EMAIL PROTECTED]
<?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_MKTREPORTPattayagoods1_" . $mmdd;

echo $cmdstr . "n";
system($cmdstr);    


$cmdstr = "php.exe -q goods2.php " . $today . " " . "2001/06/14/11:37:05" . 
             " > Y:AutoDialer_MKTREPORTPattayagoods2_" . $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,RFU1n";
            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.phpn";
// 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_idn";

}


?>



---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at
http://bugs.php.net/?id=11764&edit=2



Far EasTone Telecommunications, its subsidiaries and affiliates may review
and retain incoming and outgoing electronic mail for this e-mail address
for quality assurance and regulatory compliance purposes. The
confidentiality of internet e-mail cannot be guaranteed. Your transmission
of electronic mail to this address represents your consent to two-way
communication by internet e-mail. 



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to