php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20172 Insert some works some not
Submitted: 2002-10-30 10:28 UTC Modified: 2002-11-14 01:47 UTC
From: gsigal at ta dot telecom dot com dot ar Assigned:
Status: No Feedback Package: OCI8 related
PHP Version: 4.2.0 OS: Linux Red Hat 6.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gsigal at ta dot telecom dot com dot ar
New email:
PHP Version: OS:

 

 [2002-10-30 10:28 UTC] gsigal at ta dot telecom dot com dot ar
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>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-30 10:35 UTC] derick@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2002-10-30 11:44 UTC] gsigal at ta dot telecom dot com dot ar
When i call the page , some times insert and some times no with out an error message .
I don't know what information you need 
Thanks
This is the insert
insert into H_IMPUTACION (himputacionid, hreqid, haplicativosid, 
hcadenasid, hreleaseid, husuariosid, htareasid, htipoimputacionid, 
himputacionfecha, himputacionduracion, himputacioncp, hfechadecreacion, 
hfechadevigenciadesde, hfechadevigenciahasta, hcreadopor, hconjuntodetareasid)
 values ( H_IMPUTACION_SQ.nextval,-1, 1, 1, 2,
  'v907667', 23,1, to_date('01/12/2002','DD/MM/YYYY'), 
80, '', to_date(sysdate,'DD/MM/YYYY'),to_date(sysdate,'DD/MM/YYYY'),
  to_date( sysdate,'DD/MM/YYYY'), 'v907667', 6)
 [2002-10-30 18:37 UTC] sniper@php.net
First, read this page very carefully:

  http://bugs.php.net/how-to-report.php

Then try this snapshot:

  http://snaps.php.net/php4-latest.tar.gz

And let us know if it works any better and if not,
then give us the proper information..for starters
that error message would be nice..

 [2002-11-14 01:47 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 07:01:27 2024 UTC