Ver Mensaje Individual
  #6 (permalink)  
Antiguo 09/08/2012, 12:09
Avatar de NSD
NSD
Colaborador
 
Fecha de Ingreso: mayo-2012
Ubicación: Somewhere
Mensajes: 1.332
Antigüedad: 12 años
Puntos: 320
Respuesta: DELETE en Multitablas asociadas

Código MySQL:
Ver original
  1. DELETE pedidos_general AS PG , pedidos_datos AS PD , pedidos_info AS PII
  2. WHERE PG.Fecha<'20120101' AND PG.ID=PD.ID AND PG.ID=PII.ID

ese codigo tambien me da error.

y usando una doble declaracion:

Código MySQL:
Ver original
  1. pedidos_general AS PG, pedidos_datos AS PD, pedidos_info AS PII
  2. FROM PG, PD, PII
  3. WHERE PG.Fecha < '20120101'
  4. AND PD.ID = PG.ID
  5. AND PII.ID = PG.ID

tengo nuevamente el mismo error

Cita:
#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 'AS PG, pedidos_datos AS PD, pedidos_info AS PII FROM PG, PD, PII WHERE PG.Fe' at line 2
que molesto que una sentencia tan simple de tantos problemas...
__________________
Maratón de desafíos PHP Junio - Agosto 2015 en FDW | Reglamento - Desafios