In a statement like:, SELECT * FROM tbl1 WHERE row1=val1 OR row2=val2is it possible to find out which string was matched? If so, how can this be done? And how would you capture this in PHP?
SELECT * FROM tbl1 WHERE row1=val1 OR row2=val2
Use operator Case/IF
Case/IF
SELECT *, case when row1='val1' then 'row1' else 'row2' end as matched col FROM tbl1 WHERE row1='val1' OR row2='val2'
Casecan be replaced by the operator IFas follows
Case
IF
IF(row1='val1','row1','row2')
Source: https://habr.com/ru/post/1627577/More articles:jstree: create a new node child - javascriptSort by IP address, then keep the selection of entries until I have 3 unique IP addresses - sqlhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1627574/how-to-add-another-propertys-to-useridentity-from-table-aspnetusers-in-identity-221&usg=ALkJrhinS0H7TFkB4alRRpPDmOekMB86IwUnable to read or play video in OpenCV + Python using VideoCapture - python-2.7Align the underlined spinner in the same line next to the edit text - androidIs there a way to make HTML code independent of changes to CSS class names? - htmlhow to call AJAX function in anchor tag - javascriptAndroid NDK screen orientation - androidProgrammatic listing and connection to WIFI networks in Windows IoT Core - c #How to import a package from a subdirectory into Golang? - goAll Articles