Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5527

matmushroom on "[Plugin: Pronamic Google Maps] Need correct MySQL query to list nearby posts"

$
0
0

The query was generally correct but there was a mistake in it:

FROM wp_posts p
INNER JOIN wp_postmeta pm1 ON p.id = pm1.post_id AND pm1.meta_key = '_pronamic_google_maps_latitude'
INNER JOIN wp_postmeta pm2 ON p.id = pm2.post_id AND pm1.meta_key = '_pronamic_google_maps_longitude'

In the second line I ask for pm1.meta_key again.
Correct is pm2.meta_key
In the meantime I have finalized the project. But thanks for helping !


Viewing all articles
Browse latest Browse all 5527

Trending Articles