I'm allowing a query which searches across multiple columns -- and it does work, but since this is a "wildcard" type search where the query (say "foo") could be in any or all of the columns searched, how do I determine which column the hit(s) was/were in. I need this so I when I jump into the for loop I row out the results properly?
The search is like:
SELECT uid,sslnumber,accountnumber,accountname,accountaddress FROM accounttracking
WHERE accountnumber LIKE '%V04047%' || accountaddress LIKE '%V04047%' || accountphone
LIKE '%V04047%' || ccsdongle LIKE '%V04047%' /// cut for brevity
The results are displayed in a table. See attachment for visual. What I'm after is adding the column where the match was made to the end of the output shown in the attachment. Make sense????
Thanks.