Yes you can. Straight from the codex
The $wpdb object is not limited to the default tables created by WordPress; it can be used to read data from any table in the WordPress database (such as custom plugin tables). For example to SELECT some information from a custom table called “mytable”, you can do the following.
$myrows = $wpdb->get_results( "SELECT id, name FROM mytable" );
Related Posts:
- What’s the proper way to use a custom table? [closed]
- $wpdb->replace: WHERE?
- What is my error trying to create a new table in the database?
- How to have differents sites share the same tables of DB?
- How to delete all records from or empty a custom database table?
- WordPress Paginate $wpdb->get_results
- Backup the Database and Restore from the Backup?
- Why does $wpdb return strings for mysql integer values?
- What Is The Difference Between suppress_errors() And hide_errors() in $wpdb?
- Prevent WordPress from loading comments
- Suggestions for WPMU Migration (advanced)
- 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
- How to retrieve the value stored in a multi-dimensional array and SUM the entries?
- Why would switch_to_blog stop working?
- Adding a Table to the wordpress database
- Creating user relationships
- WP Northwind for Theme Development?
- database interactions using OOP
- Fastest way to get the comment and ping total count for a post
- $wpdb->insert running multiple times?
- wpdb custom tables without plugin
- How to use default WP form elements to interact with custom DB table?
- Your thoughts on the interaction with one custom database table from WP?
- Applying WP-cli Search & Replace to Static SQL Dump File
- Setup database structure with books, authors, languages etc. for publishing house [closed]
- Add table to WordPress database
- Custom select query two tables by a meta key
- Custom Database Table and foreach
- optimal taxonomy or custom post types
- Migrating my site to a new domain does not keep any changes made in customizer
- New Page/Post Screen Opens an Existing Post
- Advice on how to structure a custom plugin
- Custom Form Input not saving to Database
- Accountless password generation
- Add several fields from different tables to post, fields per post are in same row of table
- Where should I put this custom data?
- Show WP content on different PHP Sites
- Database custom table issues – incorrect result displayed
- Changing starting number of User ID
- Custom WordPress SQL Query 4 posts per custom taxonomy
- Accessing + retrieving custom database in WordPress
- pull custom fields values from wp-database in a nested foreach loop
- Advice how to connect custom database with WordPress, change data in WordPress and finaly use this data
- Changes to code not displaying
- get_results using wpdb
- New WP_Customize API – how does it work under the hood?
- How to include own css on wordpress tinymce editor?
- how to override woocommerce specific loop or archive-product.php [closed]
- where can i add custom script to stop header video from autoplay
- How to store foreign language characters in WordPress? [closed]
- How to execute mulitple statement SQL queries using $wpdb->query?
- How wordpress accesses its own database
- How to use get_option() without any filter?
- Is it possible to replace PHP with NodeJS?
- Change separators in HTML tags
- Cannot figure out how to center div in WordPress theme [closed]
- How to insert a single row to WP database table?
- Automatically check parents (in a taxonomy) when child is selected
- Adding custom field in all widgets, but at the top of the form, in admin area
- Always logged in even if remember me is unchecked?
- Adding posts to custom menu [closed]
- 404 (category, pages, archives) when using custom rewrite rules
- Keep Title and Description always
- Replace dynamically content in a custom database table when a custom post is created
- creating new field on mysql
- Changer numbers of columns in woocommerce shop
- Use custom header as WordPress header
- WordPress : using AJAX to get posts & Sidebar Content to an external application
- How do I modify the size of the text in my page titles?
- How to edit alternate inactive themes in “Appearance -> Customise” screen?
- WordPress Code Snippet to count total posts by author
- Custom Same Page Search
- Inline-Table under TwentyTwelve not working
- Allow a subscriber to be an author and view only his post
- Personalized Gallery what are my options?
- Trying to use .htaccess to redirect /profile to /login-2?action=profile
- How to add a template – so that i can choose a different menu for some pages
- Allow WP users to sort search result on a videos site
- wp.blocks.registerBlockType not showing what I want on the frontend
- Add a menu item to admin dashboard which isn’t a link? [duplicate]
- A WP dev site that displays content from a live site’s database but cannot write to wp_posts?
- How to narrow the area between buttons on Helium theme sidebar? [closed]
- How to add the option to choose between sizes for featured image within post editor?
- Structure of post types for TV Shows and episodes
- Adding images to anchors in the list created and fetched with wp_nav_menu
- Background setting isn’t applied to entire sidebar height
- Function to query by custom field and category
- Secondary loop doesn’t work
- Custom user fields validation on registration
- Pre_Get_Posts order DESC not registering
- Check if values exists DB
- Posts are deleted everyday at night
- Share user access between two wordpress sites
- What capability is required to view posts, scheduled in the future, by someone else?
- Adding page Title in a custom coded page
- Reached end of document without finding – using mod_pagespeed
- Disable all Fonts that are Standard in WordPress and replacing them with a custom Font?
- Custom product sorting archive page