Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/12/2011, 17:07
wchiquito
 
Fecha de Ingreso: junio-2011
Mensajes: 139
Antigüedad: 12 años, 10 meses
Puntos: 42
Respuesta: Como comparar antes de ingresar registros

Hola maximilianojcelis,

Una opción es cambiar la línea 4 por:
Código MySQL:
Ver original
  1. $query = "INSERT INTO Tags SELECT '$tagsimple' FROM (SELECT NULL) d WHERE NOT EXISTS (SELECT NULL FROM Tags WHERE Tag = '$tagsimple');