AnsweredAssumed Answered

Loop is not working on linux server

Question asked by Laxmikant Laxmikant on Jun 26, 2014
Latest reply on Jun 27, 2014 by Laxmikant Laxmikant
Dear All ,


Recently I have moved from windows server to linux server  (Centos 6).

i have a custom module in which i am unable to run loop .

this loop will stop after 47 entries


$i=1;
$q_pro = "select count(*) from product";
            $r_pro = $db->query($q_pro);

here my product count is 88

                while ($row = $db->fetchByAssoc($r_pro,-1, false))
                 {     

 $q2 = "insert into Table ( sal_sto_id, product, pack, price, op_stock, recepit, to_stock, sal_in_unit, sal_in_value, cl_stock, remark, scheme, sales_return, purchase_return, op_stock_Free, recepit_Free, to_stock_Free, sal_in_unit_Free, cl_stock_Free, sales_return_Free, purchase_return_Free) values ('".$return_id."', '".$_POST["pro_id$i"]."', '".$_POST["pro_pack$i"]."', '".$_POST["pro_mrp$i"]."', '".$_POST["opning_stock$i"]."', '".$_POST["receipt$i"]."', '".$_POST["to_stock$i"]."', '".$_POST["sales_month$i"]."', '".$_POST["value_sal$i"]."', '".$_POST["colse_stock$i"]."', '".$_POST["remark$i"]."', '".$_POST["scheme$i"]."', '".$_POST["sal_return$i"]."', '".$_POST["pur_return$i"]."' , '".$_POST["opning_stock_Free$i"]."', '".$_POST["receipt_Free$i"]."', '".$_POST["to_stock_Free$i"]."', '".$_POST["sales_month_Free$i"]."', '".$_POST["colse_stock_Free$i"]."', '".$_POST["sal_return_Free$i"]."', '".$_POST["pur_return_Free$i"]."');";
            $r2 = $db->query($q2);

$i++;
}


the insertion done only till 47 after the all values are blank...

for example if i print my values so i'll get this output..

echo $_POST["opning_stock47"] ;(output is the textbox value 22)

echo $_POST["opning_stock48"] ;(output is the textbox value ''  (null))


please suggest me any solution  .
Its too too urgent.

Thanks in advance


Laxmikant



Outcomes