[ Cuchulainn @ 22.11.2006. 12:25 ] @
Zasto ne radi upit?
delete from firme, kategorija, potkategorija where (firme.potkategorijaID = potkategorija.potkategorijaID) and (potkategorija.kategorijaID = kategorija.kategorijaID) and (kategorija.kategorijaID=18);
[ zmau @ 22.11.2006. 22:10 ] @
Ama koju poruku ti javlja ?
Upit može da bude sintaksno neispravan, može da narušava referencijalni integritet...
[ Cuchulainn @ 23.11.2006. 09:38 ] @
1064 - You have an error in your SQL syntax;check the manual that corresponds to your MySQL server version for the syntax to use near 'where (firme.potkategorijaID = potkategorija.potkategorijaID)and(potkategorija' at line 1



E to javlja baza!
[ mojeKorIme @ 23.11.2006. 09:50 ] @
zasto ne napises sta hoces da uradis sa upitom
[ zikaa @ 23.11.2006. 12:30 ] @
Iz mysql manuala-a:

Multiple-table syntax:

DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
TBL_NAME[.*] [, TBL_NAME[.*] ...]
FROM TABLE_REFERENCES
[WHERE WHERE_DEFINITION]

Or:

DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
FROM TBL_NAME[.*] [, TBL_NAME[.*] ...]
USING TABLE_REFERENCES
[WHERE WHERE_DEFINITION]

ili u prevodu postoje dva nacina da uradis to sto hoces

prvi:
delete table1, table2 from table1,table2 where nesto

i drugi:
delete from table1,table2 using table1, table2 where nesto

na prvi nacin za ovo tvoje ako hoces da obrises iz sve tri tabele

delete firme, kategorija, potkategorija from firme, kategorija, potkategorija where (firme.potkategorijaID = potkategorija.potkategorijaID) and (potkategorija.kategorijaID = kategorija.kategorijaID) and (kategorija.kategorijaID=18)

ako ne onda umesto ovog dela u crvenom napises imena samo onih tabela odakle hoces da brises