Ver Mensaje Individual
  #17 (permalink)  
Antiguo 27/07/2011, 09:59
Avatar de lobo_php
lobo_php
 
Fecha de Ingreso: noviembre-2007
Ubicación: Cali-Colombia
Mensajes: 1.869
Antigüedad: 16 años, 5 meses
Puntos: 75
Respuesta: Procedimiento MYSQL desde PHP

cierto, muy cierto.

Entonces toca así:

Código PHP:
Ver original
  1. <script language="JavaScript" type="text/javascript" src="Ajax.js"></script>
  2.  
  3. <?php
  4.  
  5. require("Conexion.php");
  6.  
  7. $Codigo=$_GET['Cod_Doc']; //me supongo es un GET
  8. $Nombre=$_GET['Nombre'];
  9. $Fecha=$_GET['fecha'];
  10. $Consult = mysql_query("SELECT distinct(`Version`) AS Version FROM `firma_conocimiento` WHERE `Cod.Doc`='{$Codigo}'") or die (mysql_error());
  11.  
  12. $regis = mysql_fetch_array($Consult);
  13. $Version=$regis['Version'];
  14.  
  15. //Aqui ejecuto mi procedimiento almacenado
  16.  
  17. $sql = mysqli_query("CALL `firmar`('{$Codigo}','{$Version}','{$Nombre}','{$Fecha}','{$Nombre}')") or die (mysql_error());
  18.  
  19. if($sql){
  20.  
  21. echo 'Se insertaron los datos';
  22.  
  23. }
  24.  
  25. ?>

creo yo, me corrigen ustedes.
__________________
Cabuntu.org - Difundiendo Software Libre en Cali, Colombia
Usuario Linux # 483175