Hosting de Calidad
  • Inicio
  • Precios y servicios
  • F.a.q y ayudas
  • Realizar pedido
  • Webs alojadas
  • Quienes somos
  • Foro HyD
  • Contacto

    Zona Dominios

    Entrar
    registro de dominios


    Zona Hosting

    Entrar
    alojamiento web


    5 Métodos de Pago
    Tarjeta de crédito
    Domiciliación
    Transferencia
    Soporte Epagado
    Soporte Paypal

    Liberalización .es

    Ver mas
    dominios .es


  •  
     
     
    OCIBindByName

    OCIBindByName

    (PHP 3>= 3_0_4, PHP 4 )

    OCIBindByName __ Enlaza una variable PHP a un Placeholder de Oracle

    Descripción

    int OCIBindByName ( int stmt, string ph_name, mixed & variable, int length [, int type])

    OCIBindByName() enlaza la variable PHP variable a un placeholder de Oracle ph_name_ Si esta será usada para entrada o salida se determinará en tiempo de ejecución, y sera resevado el espacio necesario de almacenamiento_ El parámetro length establece el tamaño máximo del enlace_ Si establece length a _1 OCIBindByName() usará el tamaño de la variable para establecer el tamaño máximo_

    Si necesita enlazar tipos de datos abstractos (LOB/ROWID/BFILE) necesitará primero reservar la memoria con la función OCINewDescriptor()_ length no se usa para tipos de datos abstractos y debería establecerse a _1_ La variable type le informa a Oracle, que tipo de descriptor queremos usar_ Los valores posibles son: OCI_B_FILE (Binary_File), OCI_B_CFILE (Character_File), OCI_B_CLOB (Character_LOB), OCI_B_BLOB (Binary_LOB) and OCI_B_ROWID (ROWID)_

    Ejemplo 1_ OCIDefineByName

    <?php
    /* OCIBindByPos example thies@digicol_de (980221)
    
      inserts 3 resords into emp, and uses the ROWID for updating the 
      records just after the insert_
    */
    
    $conn = OCILogon("scott","tiger");
    
    $stmt = OCIParse($conn,"insert into emp (empno, ename) "_
                           "values (:empno,:ename) "_
                           "returning ROWID into :rid");
    
    $data = array(1111 => "Larry", 2222 => "Bill", 3333 => "Jim");
    
    $rowid = OCINewDescriptor($conn,OCI_D_ROWID);
    
    OCIBindByName($stmt,":empno",&$empno,32);
    OCIBindByName($stmt,":ename",&$ename,32);
    OCIBindByName($stmt,":rid",&$rowid,_1,OCI_B_ROWID);
    
    $update = OCIParse($conn,"update emp set sal = :sal where ROWID = :rid");
    OCIBindByName($update,":rid",&$rowid,_1,OCI_B_ROWID);
    OCIBindByName($update,":sal",&$sal,32);
    
    $sal = 10000;
    
    while (list($empno,$ename) = each($data)) {
        OCIExecute($stmt);
        OCIExecute($update);
    } 
    
    $rowid_>free();
    
    OCIFreeStatement($update);
    OCIFreeStatement($stmt);
    
    $stmt = OCIParse($conn,"select * from emp where empno in (1111,2222,3333)");
    OCIExecute($stmt);
    while (OCIFetchInto($stmt,&$arr,OCI_ASSOC)) {
        var_dump($arr);
    }
    OCIFreeStatement($stmt);
    
    /* delete our "junk" from the emp table____ */
    $stmt = OCIParse($conn,"delete from emp where empno in (1111,2222,3333)");
    OCIExecute($stmt);
    OCIFreeStatement($stmt);
    
    OCILogoff($conn);
    ?>
     
       



    registro de dominios | alojamiento web | hosting por publicidad

       

     

    Manual de linux Manual de apache Manual de php Manual de mysql Manual de SQL Manual del Plesk Como funciona Paypal Manual de html