Ver Mensaje Individual
  #24 (permalink)  
Antiguo 08/03/2012, 14:31
Avatar de a_gomez
a_gomez
 
Fecha de Ingreso: marzo-2012
Ubicación: /var/www/
Mensajes: 48
Antigüedad: 12 años, 1 mes
Puntos: 2
Respuesta: llamar procedures de sql server en php y odbc ..

Código PHP:
Ver original
  1. <?php
  2.    
  3.     include("../conexion/conexion_workflow.php");
  4.  
  5.     if(isset($_POST["numrecibo"])){
  6.         $recibo=$_POST["numrecibo"];
  7.     }
  8.    
  9.     $query='CALL REINGRESARRECIBOSSIREP('.$recibo.')';
  10.     $res = odbc_prepare($conexionw, $query);
  11.     $rs=odbc_execute($res);
  12.    
  13.    
  14.    if (!$rs) {
  15.         exit("<strong>ERROR EN EL PROCESO DE EJECUCION </strong>");
  16.     }else{
  17.     $msj= odbc_result_all($rs);
  18.     header("location:../../sitio/administrador/reingresarrecibo.php?msj=true");
  19.  
  20.     }
  21.    
  22. ?>


PHP Warning: odbc_execute() [function.odbc-execute]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Sintaxis incorrecta cerca de '123456'., SQL state 37000 in SQLExecute in C:\inetpub\wwwroot\registros\class\operaciones\act ion_reingresarrecibo.php on line 11