compare $php variable to indexed distinct mysql columns
i'm writing a program where a php $variable has to be compared to mysql select distinct column1, column2, where column1,column2 has a unique index. how do i write the mysql query for that without using concat?
in other words, i don't want to use, select * from table where $variable = concat(column1,column2); i would like instead to make use of the index. |
Do you mean:
1. compare var to all distinct combos of concat(col1,col2) OR 2. retrieve row where var = concat(col1,col2) ?? |
All times are GMT -5. The time now is 02:55 AM. |