Ver Mensaje Individual
  #5 (permalink)  
Antiguo 18/01/2012, 19:39
ajcremon
 
Fecha de Ingreso: diciembre-2010
Mensajes: 15
Antigüedad: 13 años, 4 meses
Puntos: 1
Respuesta: El update no me funciona

Éste es código, creo que es bastante sencillo:
Código PHP:
Ver original
  1. <?php
  2.     include_once("DBconnection.php");
  3.     include_once("generalFunctions.php");
  4.     $connection = connect();
  5.     $title = $_REQUEST['title'];     
  6.     $description = $_REQUEST['description'];
  7.     $date = date("Y-n-j H:i:s");
  8.              
  9.              
  10.     $query = "UPDATE article SET title='".$title."', description='esto no funciona' WHERE title like '$title'";
  11.    
  12.    
  13.     //ejecutamos la consulta
  14.     $stmt = $connection -> prepare($query);
  15.     $stmt -> execute();
  16.    
  17.     echo mysql_error();
  18.    
  19.     disconnect($connection);
  20.    
  21.     //header("Location: ../news.php");
  22. ?>