Novo

Forum kao aplikacija na telefonu

Dodajte forum na početni ekran i koristite ga kao aplikaciju, sa menijem na dnu ekrana.

  • 4 odgovora
  • 4.048 pregleda

Najnovija ↓

Problem sa upitom 22.11.2006. u 13:25 · pre 242 meseca #1
Zasto ne radi upit?
delete from firme, kategorija, potkategorija where (firme.potkategorijaID = potkategorija.potkategorijaID) and (potkategorija.kategorijaID = kategorija.kategorijaID) and (kategorija.kategorijaID=18);
Re: Problem sa upitom 22.11.2006. u 23:10 · pre 242 meseca #2
Ama koju poruku ti javlja ?
Upit može da bude sintaksno neispravan, može da narušava referencijalni integritet...
Potpis
it works on my machine
Re: Problem sa upitom 23.11.2006. u 10:38 · pre 242 meseca #3
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!
Re: Problem sa upitom 23.11.2006. u 10:50 · pre 242 meseca #4
zasto ne napises sta hoces da uradis sa upitom
Potpis
Give me six hours to chop down a tree and I will spend the first four sharpening the axe.
Re: Problem sa upitom 23.11.2006. u 13:30 · pre 242 meseca #5
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
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme