From:             umakantpatil4 at gmail dot com
Operating system: Windowx XP
PHP version:      5.2.6
PHP Bug Type:     MySQL related
Bug description:  Problem with PHP executing mysql queries

Description:
------------
I have made PHP script which read excel file and its to
MySQL database.
Well script works properly everywhere.. but when are records less
if the records goes above 400 or 500 then file executes half only..
above 400 or 500 no record is added..
I just want solutions for this code. that it should not stop executing
code.

Reproduce code:
---------------
require_once 'Excel/reader.php';

$Filename="test.xls";

$reader = new Spreadsheet_Excel_Reader();
$reader->setOutputEncoding("UTF-8");

$reader->read($Filename);

print "Please wait process started..<br><br>";

for ($i = 2; $i <= $reader->sheets[0]["numRows"]; $i++)
{
 $r1=$reader->sheets[0]["cells"][$i][2];
 $r2=$reader->sheets[0]["cells"][$i][3];
 $r3=$reader->sheets[0]["cells"][$i][4];
 $r4=$reader->sheets[0]["cells"][$i][5];
 $r5=$reader->sheets[0]["cells"][$i][6];
 $r6=$reader->sheets[0]["cells"][$i][7];
 $r7=$reader->sheets[0]["cells"][$i][8];
 $r8=$reader->sheets[0]["cells"][$i][9];
 $r9=$reader->sheets[0]["cells"][$i][10];
 $r10=$reader->sheets[0]["cells"][$i][11];
 $r11=$reader->sheets[0]["cells"][$i][12];
 $r12=$reader->sheets[0]["cells"][$i][13];

mysql_query("insert into
bea_role(zone,branch,solid,name,empid,functional_role,target_policy,target_wpc_in_lacs,issued_achvt_policies,issued_achvt_wpc_in_lacs,achvt_policies,achvt_wpc)
values('$r1','$r2','$r3','$r4','$r5','$r6','$r7','$r8','$r9','$r10','$r11','$r12')")
or die(mysql_error());

}
print "Process Completed..";

Expected result:
----------------
Expected Result is expected that it should print both lines..
like

Please wait process started..


Process Completed..

and also it should process whole file

Actual result:
--------------
But the actual result is

Please wait process started..

the ending statement doesnt come. Hlaf of the file remains unprocessed.
Please provide solutions.



-- 
Edit bug report at http://bugs.php.net/?id=45664&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45664&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45664&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45664&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45664&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45664&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45664&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45664&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45664&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45664&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45664&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45664&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45664&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45664&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45664&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45664&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45664&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45664&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45664&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45664&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45664&r=mysqlcfg

Reply via email to