Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Problem sa upitom

[es] :: MySQL :: Problem sa upitom

[ Pregleda: 925 | Odgovora: 4 ]

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Cuchulainn
Cuchulainn
Beograd

Član broj: 63498
Poruke: 34
*.dynamic.sbb.co.yu.



Profil

icon Problem sa upitom22.11.2006. u 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);
22.11.2006. u 12:25 

zmau
Dragan Jovanović
programer, SETCCE

Član broj: 80834
Poruke: 155
*.32.eunet.yu.

Sajt: www.jovanovic.fotopic.net


Profil

icon Re: Problem sa upitom22.11.2006. u 22:10
Ama koju poruku ti javlja ?
Upit može da bude sintaksno neispravan, može da narušava referencijalni integritet...
it works on my machine
22.11.2006. u 22:10 

Cuchulainn
Cuchulainn
Beograd

Član broj: 63498
Poruke: 34
*.dynamic.sbb.co.yu.



Profil

icon Re: Problem sa upitom23.11.2006. u 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!
23.11.2006. u 09:38 

mojeKorIme
BiH

Član broj: 59512
Poruke: 236
195.222.35.*



Profil

icon Re: Problem sa upitom23.11.2006. u 09:50
zasto ne napises sta hoces da uradis sa upitom
Give me six hours to chop down a tree and I will spend the first four sharpening the axe.
23.11.2006. u 09:50 

zikaa
Zivorad Antonijevic
Beograd

Član broj: 10078
Poruke: 77
*.beotel.net.

Sajt: www.odmorise.com


Profil

icon Re: Problem sa upitom23.11.2006. u 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
23.11.2006. u 12:30 

[es] :: MySQL :: Problem sa upitom

[ Pregleda: 925 | Odgovora: 4 ]

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.