You can use wpdb
class to query your custom data from MySQL. Depending on your implementation you would either use:
- global
$wpdb
object, if your custom data is in same database as WP itself - new custom instance of
wpdb
class if you need to connect to different database for custom data
Related Posts:
- How does WordPress handle MySQL row lock errors?
- Help With MySQL to WPDB Query Conversion
- WordPress Backend HA (Automatic failover)
- DB Query not working in Plugin
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- WordPress plugin: efficient way to store large data
- How to display results from a data table with an encrypted user id?
- How can I delete the options from DB when the plugin is deleted?
- How to structure a plugin
- is_plugin_active function doesn’t exist
- Custom pages with plugin
- WordPress Plugin Development In MVC Architecture, How?
- How to properly insert data into custom table via plugin
- Checking if an attribute exists in a shortcode
- Show Similar Post Titles ( Similar to Stack Exchange )
- How do I unlock a post programmatically?
- Create page when plugin is activated
- How can I limit functionality in one version of a plugin?
- Can I explicitly specify ENGINE=InnoDB in WordPress?
- How to show custom message once on plugin activation?
- How to list the Hooks and order of execution in current loading page? [duplicate]
- How to load a new template page according to a particular URL?
- WordPress network: set themes and plugins for new blog
- Updating post meta for custom post types
- Can a plugin add to header/footer/body content?
- Changing BIGINT to INT
- WordPress register_activation_hook table creation not working
- REST-API: extend media-endpoint
- clean wp_options table unused rows
- greatest() function returns undefined property
- Is there a way to alter the order in which the plugins appear in the page?
- How to write one comment and publish on every post using database or plugin?
- How to use get_theme_mod in gutenberg editor wordpress?
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- WordPress plugin – Error “Plugin generate 2890 characters of unexpected output when activated”
- My plugin wants to update another plugin
- Plugin Options Not Saving to Database in WP 4.5
- How to create custom tables in WordPress using my own plugin?
- Edit Yoast SEO breadcrumbs output [closed]
- How would I go about creating a user ranked post popularity page?
- Disable woocommerce cookies and delete cart data automatically
- How can I perform high-level database merging for WordPress within continues delivery?
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- Plugin: register_deactivation_hook works perfectly well, while register_activation_hook suddenly stopped working
- Customization API for plugin development
- Fromcraft Plugin On click submit button [closed]
- Migrating to WordPress Recipe Plugin and Some SQL Issues
- Multiple instance of data in plugin custom database table on plugin activation
- How to redirect users to their profile after they successfully edit their profile
- Better ads plugin has 500.000 entries in wp_postmeta
- Redirect to another page using contact form 7? [closed]
- Is it necessary to auto delete my WP plugin database tables when users deactivate/delete my plugin?
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- Custom post types – remove default post supports through empty array?
- How to insert and call new data in wordpress website database through a plugin
- WPDB: Update table
- Separate database for a wordpress plugin
- Add some fileds to the wp_posts table
- Best/Correct way to add an option to a category
- Always get creating a new table with foreign key
- How to do database for download stats?
- What is the WordPress approach to custom data?
- Loop in elementor custom widget not working
- Way to send multiple values for column to MySQL?
- Delete data from custom table when deleting a post
- Can’t create tables with my plugin
- unregister a sidebar widget
- add_action for publish_post doesn’t work
- How to keep plugin (media-sync) running even the tab is closed?
- What database state changes happen after a post is manually “updated” with no changes?
- Cant create table on plugin activation
- How to access a wordpress plugin page or add posts without doing it from the WordPress dashboard?
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Rename a folder via HTML POST request
- Move plugin pages from dashboard to front-end
- working code, not working – Plugin Dev
- WordPress UPDATE queries on MySQL database stuck
- Cannot view Custom Post Type no matter what I try
- Moving a few select DB tables to a new WP instance
- Custom wp_list_tables redirect on specfic page
- Paid Membership Pro displaying a user name in PHP
- Installation failed, trying to install ANY plugin
- How to use custom footer template in a site-plugin?
- Creating Nested custom fields
- Where do the section input fields values are stored in database
- My plugin can’t see my files
- Confusing problem with displaying message recipient metadata
- Resetting AUTO_INCREMENT primary key
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- Update Plugin Without Overwriting Custom Settings
- Get page type to display content
- Creating fields in the database
- How to submit the custom form data in database in WordPress without plugin?
- how to search through plugin in wordpress cimy-user-extra-fields?
- Get all the related data from WordPress DB
- How to add image for custom taxonomy
- Why haven’t I see plugins using get_file_data to handle retrieving plugin version?
- How can I properly sanitize the update_option in WordPress?
- Create Custom Coupon Type
- Take Elementor For Email FIeld Check if user is registered. IF not registered then register on woocommerece