Page 1 sur 1

DELETE multitable

Posté : 26 mars 2005, 18:43
par Crashbdx
Bonjour comment puis je faire un delete multitable ?

j'ai essayé ca :

$sql = "DELETE FROM studio,campagnes,photographes WHERE studio=$varville"

mais ca ne marche pas.

merci d'avance.

Posté : 26 mars 2005, 19:25
par eSp
Salut,

Un petit tour dans la doc t'aurait permis de trouver ceci:
Syntaxe multi-tables :

DELETE [LOW_PRIORITY] [QUICK] [IGNORE] table_name[.*] [, table_name[.*] ...]
FROM table-references
[WHERE where_definition]

ou :

DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
FROM table_name[.*] [, table_name[.*] ...]
USING table-references
[WHERE where_definition]
++