I'm trying to update information in my database but it is not updating and i'm not getting any error. But when I execute the query with MySQL Query Browser it works and the information is updated correctly.
function cancelaDetalleOrden($id_orden,$id_pos,$id_componente)
{
conectar();
$cancelado= "Cancelado";
$terminado= "Terminado";
echo $id_orden." ".$id_pos." ".$id_componente;//to check if data is retrieved
$query ="UPDATE procesos_orden
SET `status` = '$cancelado'
WHERE (`status` != '$terminado') = '1'
AND `id_orden` = '$id_orden'
AND `id_posicion` = '$id_pos'
AND `id_componente` = '$id_componente';";
mysql_query($query)or die("Error ".mysql_error());
}
This is really weird because I have other functions where I update and they work well.
$queryvariable contains?$result = mysql_query($query) or die("Error ".mysql_error());