Questions tagged [join-tables]
The join-tables tag has no usage guidance.
30
questions
0
votes
1
answer
16
views
WPML posts_joins on translated items
I found a way to filter the search query so it goes though the product_cat title and description to look for a term and then display all the connected product.
I am now looking for a way to make it ...
1
vote
0
answers
231
views
WordPress post_where & posts_join not working only for custom post type
I have a custom WordPress plugin built for booking courses etc.
My custom plugin has some new tables in which custom data like slot date, time etc are stored.
I am trying to modify archive query for ...
0
votes
0
answers
60
views
Custom SQL query slows down when using multiple OR ... LIKE ... in posts_where filter
I have built a posts query that includes a custom table in search using the posts_join and posts_where filters.
Now the customer wants me to include yet another custom table in the search, but doing ...
0
votes
1
answer
343
views
can I extend the WP_Query class to deal with 'duplicate' posts created by joining to wp_posts?
Based on the premise that one big database requests is better than many smaller ones, I've modified WP_Query for my custom post type 'word' and joined three tables to it. The resulting query looks ...
0
votes
2
answers
184
views
order posts by a secondary query that counts items
i'm working on a music plugin.
It uses a custom table tracklist_items to store every tracks of a playlist; which has a structure like this :
|id| |track_id| |tracklist_id| |order| |time|
So if I ...
1
vote
2
answers
2k
views
How to display upcoming events by dat with Modern Events Calendar Lite
I'm using the plugin Modern Events Calendar Lite.
This is a recent plugin, so actually no doc exist.
So i'm looking a way to display my upcoming events on homepage. But i can not make it to work, ...
0
votes
1
answer
86
views
Build table using Advanced Custom Fields
I have a table that populates data pulled from ACF. It basically adds a PDF of a report if there's one available. I think I got that part figured out, but my code is awfully complicated and I'll like ...
1
vote
0
answers
85
views
What Is the Proper Way to Merge Usermeta Table to a an existing WP Database?
I'm currently testing some features on a sandbox environment. I have an existing production website and I'd like to ship my production users and other related tables on new sandbox environment. While ...
4
votes
1
answer
1k
views
Custom Queries: Joining On Meta Values From Two Custom Post Types
Hi – I'm hoping this is the right place to be asking this question.
I am in the process of moving my full football club website onto Wordpress, therefore using a single database for the information ...
-1
votes
1
answer
26
views
How do I insert the following into my custom table?
$service = array(
'show_option_all' => 'Select your Service',
'show_option_none' => '',
'option_none_value' => '-1',
'orderby' => 'name',
'order' => 'ASC',
...
0
votes
0
answers
179
views
Custom user query - orderby meta_key (that may not exist)
I'm in need of someone who knows MySQL better than I do! I've started writing a custom statement, but I'm not an expert with mySQL and it's not quite there (I'm happy to scrap it entirely if there's a ...
0
votes
2
answers
3k
views
What does the $posts_join filter join to?
I am trying to use the posts_join filter to join 2 tables: wp_postmeta to wp_posts. I am a novice at SQL, so I'm not sure if I am confused because I don't understand how WordPress is implementing ...
1
vote
1
answer
14k
views
writing inner join in wpdb
I have a problem in writing SQL Inner Join syntax in wordpress,
This logic should definitely work, I tried this in phpmyadmin and it works fine
SELECT booking_calendars.cal_name
FROM ...
2
votes
2
answers
3k
views
Query All users that has post
I have this query so far :
$user_args = array(
'role' => 'frontend_vendor',
'orderby' => 'display_name',
'order' => 'ASC',
...
0
votes
1
answer
2k
views
Inner Join user tables to select users with roles
I am trying to view a list of users (who are music artists) with the following function.
function show_authors($ltr) {
global $wpdb;
$querystr = "SELECT $wpdb->users.* FROM $wpdb->...