First of all you are trying to combine both of the tables by post_parent.
$wpdb->posts.post_parent = $wpdb->ftcalendar_events.post_parent
I guess data in the ftcalendar_events has children of posts table, try
$wpdb->posts.ID = $wpdb->ftcalendar_events.post_parent
Also you can try joining tables:
SELECT * FROM $wpdb->posts JOIN $wpdb->ftcalendar_events
ON $wpdb->posts.ID = $wpdb->ftcalendar_events.post_parent
WHERE $wpdb->posts.post_status="publish" AND $wpdb->posts.post_type="post"
ORDER BY $wpdb->posts.post_date DESC
Related Posts:
- WordPress Paginate $wpdb->get_results
- $wpdb->replace: WHERE?
- Display posts by combining multiple meta key
- What is my error trying to create a new table in the database?
- get_var result empty for query of custom table in plugin admin
- Custom WordPress SQL Query 4 posts per custom taxonomy
- Custom Search Query
- How to deal with multiple select options using register_setting() theme options
- Creating search form for custom database table
- Can’t pass table to $wpdb->prepare
- Can I use $wpdb for my custom tables in the WordPress database?
- Create subpage /user/ or /my-profile/ like /author/ with additional query like /user/user123
- Retrieve and display data from custom db table in admin area?
- How to find if a post with custom_field == X exists?
- Custom search page and search by title, content and tag
- Modifying loop on a custom page, strange behaviour
- Get multiple db prefix with $wpdb
- How can I add data to a custom column in the Users section of the wordpress backend?
- Custom widget select options needs to stay selected after save
- What’s the proper way to use a custom table? [closed]
- Why would switch_to_blog stop working?
- Adding a Table to the wordpress database
- Get Value from Column in Plugin Table [closed]
- How I display post of the post type group by year of post?
- Load more posts with multiple queries
- Hi, I wanted to make custom search with multiple fields
- The function can not create a table on MariaDB server
- wp_query get post custom taxonomy in search.php
- Creating custom database table with crud operation
- $wpdb->insert running multiple times?
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- wpdb custom tables without plugin
- Order posts with a custom field but also without
- Save title as custom field on custom post type
- Add content in between of foreach
- Why Query is returning empty array?
- Custom Loop Query For Search Page
- dbDelta not creating tables with composite keys
- Custom SELECT Query With Multiple Meta Values (Ordering Problem)
- Saving contact form 7 data into custom Table
- How to make wordpress use a non-wordpress users table?
- Query for specific custom field
- Gravity Forms – gform_field_value – query custom table breaks functions.php
- Custom Same Page Search
- Fatal error Call to a member function insert() on a non-object [closed]
- custom user meta query
- Recent activity query WordPress
- How to query term_id of a Custom Taxonomy by name
- Custom Database Table and foreach
- WP Search Form Query: Add Author’s posts into search query
- query variables for custom taxonomies
- WordPress search on a custom table
- display text generated via custom get query string
- Get All Results From Other Users That Share The Same Custom User Meta As Current User
- Custom query pagination with php parameter as arg problem
- How to have differents sites share the same tables of DB?
- Menu selection for header
- How to automatically pull an information from a form field onto an other page?
- Query Posts to display all posts with category “custom field value”
- data retrieval presents last set of data
- Create single{custom}.php with data in table out of wp_posts
- Fastest and most efficient SQL query to check if UID exists
- Query 1 custom post type, each day, alphabetically
- Custom Select Query pagination not working properly
- Ajax Form data is not posted back to the get_results()
- Database custom table issues – incorrect result displayed
- Multiple Taxonomies Using Custom SQL Query
- Search a meta field for a value in all posts
- Create Table Failed Column Date DateType
- Custom MySQL query to list post
- Custom Query Arguments
- pull custom fields values from wp-database in a nested foreach loop
- Custom Query for Taxonomy
- Custom table or form
- Ajax Query returns zero
- How to get value from wp_usermeta table in database?
- Include plugin´s table in custom query
- When is it OK to create a custom table for a plugin? [duplicate]
- User Query Multiple Orderby Clause
- How to *remove* a parent theme page template from a child theme?
- Is their any way to Extend WPDB class and Overwrite the Default Query Function
- Print shortcode in custom action hook not where the shortcode is entered
- simple expandable vertical menu, java script problem
- Best way to integrate an existing PHP application into WordPress
- Get stock by custom meta field on all Woocommerce variable products
- how to make a custom field readonly or disabled by user role?
- Can readers download zip files from WordPress sites?
- How can I resolve a .htaccess internal server error setting up a WordPress multisite?
- Product page not found if product data is set Appointment Service
- Replace an URL with an new URL which has a “?” in it
- Child Theme – Changing Header
- remove or hide Link Relationship (XFN) form Menus tab
- database select issue
- Changing ‘Add to cart’ button text and relink for some specific products [closed]
- ‘str_replace’ and ‘strtr’ not working inside plugin
- Pulling values from a sepcific row in table
- Edit a custom admin page
- Cannot upload to S3 using CDN Sync Tool
- Very Simple Geo targeting
- Custom Post want button to add image and save in Postmeta