Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • Cool thanks - never saw the coalesce() function before - going to try now. Commented Apr 14, 2011 at 2:11
  • Phil, I just changed my function and I'm getting an error - I'm about to post it back in the question - you mind taking a look? Commented Apr 14, 2011 at 2:58
  • WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = '_aioseop' at line 4] Commented Apr 14, 2011 at 3:09
  • I think it's because of the WHERE directly after the ON variables Commented Apr 14, 2011 at 3:11
  • @Bob Is it $wpdb->post_meta or $wpdb->postmeta? You use both and I'm guessing the the latter is the valid one. Commented Apr 14, 2011 at 3:26