Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/09/2009, 08:49
Avatar de _eNGeLs_
_eNGeLs_
 
Fecha de Ingreso: noviembre-2007
Ubicación: CDE, Paraguay
Mensajes: 278
Antigüedad: 16 años, 5 meses
Puntos: 4
Respuesta: Como borrar dato de DB

Puedes hacerlos de esta forma, obteniendo item_id y char_id desde desde parametros de la funcion

Código PHP:
function DeleteItem($item_id,$char_id)

      include(
'config.php');
      
$query mysql_query("DELETE FROM `items` WHERE item_id='".$item_id."' AND charID='".$char_id."'");
                
      echo 
"Item Correctamente<br>";
      echo 
"<a href='#'>[VOLVER A LISTA DE SERVIDORES]</a>";

o dentro de la funcion obtienes las ids pasados por GET..

Código PHP:
function DeleteItem()

      include(
'config.php');
      
$item_id=$_GET['item_id'];
      
$char_id=$_GET['char_id'];
      
$query mysql_query("DELETE FROM `items` WHERE item_id='".$item_id."' AND charID='".$char_id."'");
                
      echo 
"Item Correctamente<br>";
      echo 
"<a href='#'>[VOLVER A LISTA DE SERVIDORES]</a>";

Espero te sirva..
Salu2!
__________________