MySQL Query Question
Alright I am not the greatest when it comes to PHP/MySQL in general. I am trying to make my own Search page that will let you search for multiple profile fields at the same time via a form. However, I can’t wrap my head around how to do this in the current setup. What is confusing me is that all of the extra profile values are in the same column (called “values”) but they are separated by rows differentiated by “field_id”.
So, I am trying to do a query like:
SELECT * FROM wp_bp_xprofile_data WHERE value LIKE ‘%–MY SEARCH PARAMS–%’
Problem is, the search parameters are all in the same column, “value” but all in different rows? So how do you select from the same column, but from different rows? How do you overcome this problem? I am totally confused and could use some general guidance!
You must be logged in to reply to this topic.