![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
08/01/2016, 16:10
|
![Avatar de detective_jd](http://static.forosdelweb.com/customavatars/avatar405527_2.gif) | | | Fecha de Ingreso: abril-2011 Ubicación: Salto
Mensajes: 437
Antigüedad: 13 años, 9 meses Puntos: 6 | |
Respuesta: Evitar eliminar registros con php hola x_atrix probé el código del cual me lo diste pero sale este error:
DELETE FROM roles WHERE rolId = ? AND NOT IN (SELECT DISTINCT rolId FROM usuarios) // esto es un echo
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IN (SELECT DISTINCT rolId FROM usuarios)' at line 1
¿porque será? saludos y espero respuestas. |