Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/11/2012, 11:32
Avatar de mager3
mager3
 
Fecha de Ingreso: junio-2012
Ubicación: Medellin
Mensajes: 318
Antigüedad: 11 años, 10 meses
Puntos: 4
Información error al actualizar una tabla de SQL server desde php

hola a todos,

al tratar de hacer el UPDATe me arroja el siigueinte error, en que estoy fallando?

Fatal error: Call to undefined function mssql_query() in C:\Program Files\VertrigoServ\www\Gisis\meco_2.php on line 8


y aqui el codigo....


Código PHP:
Ver original
  1. <?php
  2. $dsn = "Driver={SQL Server};Server=MILENIUN\SQLEXPRESS;Database=C04;Integrated Security=SSPI;Persist Security Info=False;";
  3. $cid = odbc_connect( $dsn, 'sa', 'sa' );
  4.  
  5.   $sql = "UPDATE    FACENCABEZADOFACTURAVENTA
  6. SET              FACImpresoEncabezadoFacturaVenta = 'false'
  7. WHERE     (FACNumeroFacturaVentaEncabezadoFacturaVenta = '000000000049614')";
  8.   $res = mssql_query($sql,$cid);
  9.   if (!$res) {
  10.     print("SQL statement failed with error:\n");
  11.     print("   ".mssql_get_last_message()."\n");
  12.   } else {
  13.     $number_of_rows = mssql_rows_affected($con);
  14.     print("$number_of_rows rows updated.\n");
  15.   }
  16.  
  17.   mssql_close($con);
  18. ?>