mysql if elseif syntax condition -


if have 2 parameter "parameterx" , "parametery"

and i'll using "parameterx" , "parametery" commend sql snytax

like as

select * test.test  if(parametery!=0)  test.test.'x'=parameterx , test.test.'y'=parametery  else if  test.test.'x'=parameterx  end if 

i know this's can't work want know have other way , can work in mysql

or easier (than @diehud's answer):

select * test.test  test.test.'x'=parameterx , (test.test.'y'=parametery or parametery=0) 

Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -