From:             [EMAIL PROTECTED]
Operating system: Linux Red Hat 6.2
PHP version:      4.2.0
PHP Bug Type:     Oracle related
Bug description:  Insert some works some not

some times insert some times no without an error message ...
Thanks !
<?php
require('./db-include.inc');
putenv("LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/u01/app/oracle/product/8.1.7/lib");
putenv("ORACLE_HOME=/u01/app/oracle/product/8.1.7");
$handle = OCILogon(DB_USER,DB_PASS,DB_NAME);
?>
<HTML>
<HEAD>
<script language="JavaScript">
function refresh(){
parent.bottomframe.location.reload();
}
</script>
<title>ABM de Horas de SOPORTE TECNICO</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php

//PARA EL CASO QUE ELIJO UN APLICATIVO EN ESPECIFICO
if ($aplic >0){
                if($req>-1 and $rel>=-1){
                        $query4="select HCADENASID from H_APLICATIVO_X_REQ
where HREQID=$req and HAPLICATIVOSID
=$aplic";
                        }
                else if($req==-1 and $rel>-1){
                        $query4="select A.HCADENASID from H_APLICATIVO A,
H_CADENAS C, H_RELEASES R where A.HCA
DENASID=C.HCADENASID and R.HCADENASID=C.HCADENASID and R.HRELEASEID=$rel
and A.HAPLICATIVOSID=$aplic";

                        }

                        $stmt4=OCIParse($handle,$query4);
                        OCIDefineByName($stmt4,"HCADENASID",$cadena2);
                        OCIExecute($stmt4);
                        OCIFetch($stmt4);
                        OCIFreeStatement($stmt4);
                        $query="insert into H_IMPUTACION (himputacionid,
hreqid, haplicativosid, hcadenasid, hr
eleaseid, husuariosid, htareasid, htipoimputacionid, himputacionfecha,
himputacionduracion, himputacioncp, hfec
hadecreacion, hfechadevigenciadesde, hfechadevigenciahasta, hcreadopor,
hconjuntodetareasid) values ( H_IMPUTAC
ION_SQ.nextval, $req, $aplic, $cadena2, $rel, '$PHP_AUTH_USER', $tareas,
$tipoimput, to_date('$fecha','DD/MM/YY
YY'), $horas3, '$cp', to_date(sysdate,'DD/MM/YYYY'),
to_date(sysdate,'DD/MM/YYYY'), to_date(sysdate,'DD/MM/YYYY
'), '$PHP_AUTH_USER', $grupotareas)";
                        $stmt=OCIparse($handle,$query);
                        OCIExecute($stmt);
                        OCICommit($handle);
                        OCIFreeStatement($stmt);
//PARA EL CASO QUE ELIJO TODAS LAS APLICACIONES DE UN RELEASE O
REQUERIMIENTO


        if ($aplic==0){
                if(($req>-1) and ($rel>=-1)){
// PARA EL CASO EN QUE ELIJO UN REQUERIMIENTO Y/O UN RELEASE


                                $query2="select count (AR.HAPLICATIVOSID)
AID from H_APLICATIVO_X_REQ AR where
AR.HREQID=$req ";
                                $query3="select HAPLICATIVOSID, HCADENASID
from H_APLICATIVO_X_REQ where HREQID
=$req ";
                                }
                else if(($req==-1) and ($rel>-1)){
//PARA EL CASO EN QUE ELIJO SOLO EL RELEASE


                                $query2="select count (A.HAPLICATIVOSID)
AID from H_APLICATIVO A, H_CADENAS C,
H_RELEASES R where A.HCADENASID=C.HCADENASID and R.HCADENASID=C.HCADENASID
and R.HRELEASEID=$rel";
                                $query3="select A.HAPLICATIVOSID,
A.HCADENASID from H_APLICATIVO A, H_CADENAS C
, H_RELEASES R where A.HCADENASID=C.HCADENASID and
R.HCADENASID=C.HCADENASID and R.HRELEASEID=$rel";
                                }

//CALCULO DE HORAS POR APLICATIVO
        $stmt2=OCIParse($handle,$query2);
        OCIDefineByName($stmt2,"AID",$vcant_aplic);
        OCIExecute($stmt2);
        OCIFetch($stmt2);
        OCIFreeStatement($stmt2);
        $horas4=$horas3/$vcant_aplic;
//LEVANTO UN CURSOR PARA DAR DE ALTA APLICATIVO X APLICATIVO
        $stmt3=OCIParse($handle,$query3);
        OCIDefineByName($stmt3,"HAPLICATIVOSID",$aplicss);
        OCIDefineByName($stmt3,"HCADENASID",$cadenass);
        OCIExecute($stmt3);
while(OCIFetch($stmt3)){
                                                $query="insert into
H_IMPUTACION (himputacionid, hreqid, haplic
ativosid, hcadenasid, hreleaseid, husuariosid, htareasid,
htipoimputacionid, himputacionfecha, himputaciondurac
ion, himputacioncp, hfechadecreacion, hfechadevigenciadesde,
hfechadevigenciahasta, hcreadopor, hconjuntodetare
asid) values ( H_IMPUTACION_SQ.nextval, $req, $aplicss, $cadenass, $rel,
'$PHP_AUTH_USER', $tareas, $tipoimput,
 to_date('$fecha','DD/MM/YYYY'), $horas4, '$cp',
to_date(sysdate,'DD/MM/YYYY'),to_date(sysdate,'DD/MM/YYYY'),to
_date( sysdate,'DD/MM/YYYY'), '$PHP_AUTH_USER', $grupotareas)";

echo '1';
                                               
$stmt=OCIParse($handle,$query);
                                                OCIExecute($stmt);
                                                OCICommit($handle);
                }
        OCIFreeStatement($stmt3);
        }
//OCIFreeStatement($stmt);
echo $query;
?>
<body bgcolor="#FFFFFF" text="#000000" background="/images/cnvbkgnd.jpg"
link="#0000FF" vlink="#000066" alink="
#000099" onLoad="refresh()">
<a href="/index.htm" target="_parent"><img src="/images/home1.gif"
width="89" height="16" border="0"></a><br>
<a href="./alta8horas.htm" target="_parent"><img src="/images/atras.gif"
width="89" height="16" border="0"></a>
<br>
<div align="center">
  <h4>Se ha agregado un nuevo registro de Horas.
    <br>
</div>
</body>
</html>
-- 
Edit bug report at http://bugs.php.net/?id=20172&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20172&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20172&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20172&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20172&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20172&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20172&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20172&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20172&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20172&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20172&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20172&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20172&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20172&r=isapi

Reply via email to