non voglio assolutamente mettere in discussione quanto dici, dato che sicuramente ne so molto meno...
ma come è possibile che elimina da più tabelle in questo caso?:
cioè.. elimina sia da ute_uni che da unita...codice:$query ="DELETE ute_uni, unita FROM ute_uni INNER JOIN unita ON ute_uni.uniid = unita.uniid INNER JOIN scale ON unita.scaid = scale.scaid WHERE scale.palid = '".$palid."'";
io invece sì, perchè una singola delete MySQL può cancellare righe da più di una tabella.
In particolare hai usato la
per cuiMultiple-table syntax:
DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
tbl_name[.*] [, tbl_name[.*]] ...
FROM table_references
[WHERE where_condition]
Se invece vuoi evitare questo comportamento devi usare il DELETE e bastaFor the multiple-table syntax, DELETE deletes from each tbl_name the rows that satisfy the conditions. In this case, ORDER BY and LIMIT cannot be used.
(delete from tabella... blablabla)
Ultima modifica di MySQL; 30-05-2015 a 23:01