Mysql WHERE Query -


little query

i have query

select   link_usluge, id_usluge, naslov_usluge, mesto,   deo_grada, adresa, telefon, opis,   naslov_kategorije, kompletno   usluge left join kategorija on koja_kategorija=id_kategorija    naslov_kategorije '%auto mehaničar%'   , mesto '%novi sad%'   , deo_grada '%detelinara%'   , markevozila '%skoda%' order    id_usluge desc  

i need query add this, in query have markevozila='sve marke', means in mentioned query have add rows have sve marke in row, , add rows have like markevozila '%skoda%' how query that, idea?

txanks lot

example

simple, want have results markevozila='sve marke' , query want add markevozila '%skoda%'. in serbian sve marke means allcars, , markevozila means typeofcars, way when enters audi query results audi, want add result , other results have typeofcars='allcars

you can changing markevozila '%skoda%' (markevozila = 'sve marke' or markevozila '%skoda%'):

select   link_usluge, id_usluge, naslov_usluge, mesto,   deo_grada, adresa, telefon, opis,   naslov_kategorije, kompletno   usluge left join kategorija on koja_kategorija=id_kategorija    naslov_kategorije '%auto mehanicar%'   , mesto '%novi sad%'   , deo_grada '%detelinara%'   , (markevozila = 'sve marke' or markevozila '%skoda%') order    id_usluge desc 

it's important put parentheses around or i've done above - if don't expression won't work properly. let me know if you'd me explain parentheses more - it's long explanation if need i'd happy write up.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -