#45664 [Opn->Bgs]: Problem with PHP executing mysql queries
| From: | jani@php.net | Date: | Thu, 31 Jul 2008 22:46:46 +0000 |
| Subject: | #45664 [Opn->Bgs]: Problem with PHP executing mysql queries | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-127456@lists.php.net to get a copy of this message | ||
ID: 45664
Updated by: jani@php.net
Reported By: umakantpatil4 at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: Windowx XP
PHP Version: 5.2.6
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2008-07-31 11:18:19] umakantpatil4 at gmail dot com
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 this bug report at http://bugs.php.net/?id=45664&edit=1