php - SQL find which OR was matched -
in statement like: select * tbl1 row1=val1 or row2=val2, possible know row matched? if how done? , how capture in php?
use case/if statement
select *, case when row1='val1' 'row1' else 'row2' end matched col tbl1 row1='val1' or row2='val2' case statement can replaced if statement this
if(row1='val1','row1','row2')
Comments
Post a Comment