The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
23 views

WP_Query hit max joins… How else can I build a search function that uses custom fields?

I'm trying to search a custom post type of "Properties", while doing so I'm also searching the custom fields using multiple (anywhere from 5-30) meta_queries. The problem is Wordpress or MySQL is ...
0
votes
0answers
48 views

All images from posts of specific category

I'm photographer and am developing my own portfolio, it's in the final stage. I'm trying to get all images from posts in a specific category. I can actually get all images from all posts, but they ...
0
votes
0answers
42 views

unable to join tables and display correct result

I'm using multisite for a real estate agent association and I have a plugin that will get all listings within the network and post to main site as a post, plugin is working great; the plugin used to ...
0
votes
1answer
75 views

Are term_taxonomy_id and term_id the same?

I have a custom query where I need a JOIN because I want to COUNT all the posts of a specific category. So I checked the tables and I found out that table wp_term_relationships contains a reference ...
0
votes
1answer
93 views

$wpdb - joining shows no result

For one of my client's WP site, I'm making a plugin, where I'm using the db Query. I've two custom tables dedicated to the plugin: user_req — stores user chosen posts along with some custom ...
0
votes
0answers
24 views

Calculation for each custom post type

I have a code looking like something like this: (It calculates number of registered members for each course) foreach($courses as $course) { global $wpdb; $sql = "SELECT COUNT(*) FROM ...
0
votes
2answers
88 views

How to join tables?

I know many posts is on the site about this but I can't understand how it work. This SQL works. SELECT wp_category.id, wp_ogloszenia_kupione.kategoria, klient_id FROM wp_category JOIN ...
0
votes
1answer
40 views

Reordering content using a meta value

I've got this theme where you can add posts of type "portfolio", and I want to be able to reorder them up. I've added a custom meta field called "position" and I've set already those values. All good. ...
0
votes
1answer
363 views

Wordpress SQL JOIN query

Hi Im trying to run 2 querys in the same query call. // send the query global $wpdb; $commentQ = "SELECT * FROM $wpdb->comments " . $whereClause . $orderBy; $comments = ...
1
vote
2answers
258 views

Join new table with SQL query

I created a plugin with a new table (wp_soundcloud) and I need to retrieve the data from that new table along with the post data. Here is my query: $querystr = " SELECT $wpdb->posts.*, ...
0
votes
1answer
214 views

List author's posts with SQL

I want display authors'posts with the code below but authors' name aren't showing. What is wrong? <? // query test $qry = $wpdb->get_results( $wpdb->prepare(" SELECT * FROM $wpdb->posts ...
-1
votes
1answer
103 views

Custom wordpress SQL statement for a website

I'm trying to link specific columns from a few standard tables in a wordpress database. I specifically want to see a view/table that includes: post title post content guid meta value = image url ...
0
votes
2answers
184 views

Joining tables not working in the post editor page

I am developing a plug-in which stores data in a custom table and is joined onto the wp_posts by the post's the id. I then use the posts_join and post_fields filters to join my table and be able ...
0
votes
1answer
2k views

Join inside a wpdb query.. confused!

I need to get a return from a query that provides me with email, username or nicename as well as post title based on author id. The query is to run once daily via cron and look for posts that have ...