I have a table that looks like this:
meta_id post_id meta_key meta_value
271 4 _aciudad New york
270 4 _apais USA
267 10 _aservicio Alojamiento
...
261 43 _apais USA
238 43 _aciudad Chicago
262 43 _aservicio Alojamiento
...
261 43 _apais USA
238 43 _aciudad Miami
262 43 _aservicio Alojamiento
I need to display all the entries that match Country > City. Or order all the _aciudad entries by country; something like:
meta_id post_id meta_key meta_value meta_key meta_value
235 42 _aciudad New York _apais USA
236 56 _aciudad Chicago _apais USA
237 57 _aciudad Miami _apais USA
238 58 _aciudad Sidney _apais Australia
238 59 _aciudad Melbourne _apais Australia
I have no idea how to do this; I guess with an INNER JOIN?