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?
- 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?
- Custom plugins/Manipulated plugins: Always a terrible idea to inherit these types of WP sites that discourage updates? [closed]
- Default Plugin Settings Not Writing to Database
- How to determine what is generating large amount of database queries?
- Building an email signup form. Where should the information be saved in the DB?
- 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
- JS Support Ticket – Auto create WP account
- Input with spaces in Shortcode attributes overwritten by defaults
- How to create custom tables in WordPress using my own plugin?
- Is it possible to create Custom Post plug-in?
- Edit Yoast SEO breadcrumbs output [closed]
- How would I go about creating a user ranked post popularity page?
- Creating mySQL procedure with $wpdb
- Disable woocommerce cookies and delete cart data automatically
- Prevent duplicate records in plugin table
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- custom payment gateway in woocommerce failed to connect to remote api server
- 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]
- WordPress plugin creation how to execute .sql in order to insert multiple rows at activation of plugin
- Best way to maintain and update 3rd-party WP plugin when developer is unresponsive?
- Plugin: register_deactivation_hook works perfectly well, while register_activation_hook suddenly stopped working
- Insert data from .sql file in wordpress plugin
- Automatic switch to backup database on fail
- Customization API for plugin development
- How can I change the meta_key for a particular piece of information?
- 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]
- Can I create a table on my DB without creating a plugin?
- WordPress : Explain Plugins & Theme string value in database
- 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
- Issue running db create table query from static method
- Separate database for a wordpress plugin
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- dbDelta not adding additional columns in plugin database update
- Plugin function inside custom 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
- How to create plugin/ page that reads from database
- Minimize and Uglify WordPress Plugin Files
- External wpdb connections in different plugins on single page
- How to create a plugin that includes all the other plugins?
- Why is it important to check for isset and is_array before checking in_array in this example?
- Way to send multiple values for column to MySQL?
- Calling a save function from a “submit” button
- Plugin generating unexpected output – on WP mysql dump import
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]
- Delete data from custom table when deleting a post
- Can’t create tables with my plugin
- Custom Module, Extending WP with a Plugin?
- unregister a sidebar widget
- Custom Post Type, Custom Columns List
- add_action for publish_post doesn’t work
- How to make a Product page without ordering and database
- How to keep plugin (media-sync) running even the tab is closed?
- How to get the custom field value using SQL query
- Check if theme supports sidebar
- Need to know if my approach to designing a geneaology plug-in for wordpress makes sense
- What database state changes happen after a post is manually “updated” with no changes?
- I created a plugin with ‘view page’ that uses MYSQL + PHP. When I use wp_insert_post(), it turns everything to HTML
- Cant create table on plugin activation
- How to access a wordpress plugin page or add posts without doing it from the WordPress dashboard?
- Performing CRUD operations on front end in wordpress
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Ultimate Members Default Post Layout problem
- I want to schedule email (date, time is in database->table) wp_schedule_event() not working
- Rename a folder via HTML POST request
- How to securely controlling data without keeping it in postmeta?
- $wpdb->insert not working inside save_post tag
- Move plugin pages from dashboard to front-end
- working code, not working – Plugin Dev
- WordPress UPDATE queries on MySQL database stuck
- Store GravityForm data in phpmyadmin (mysql)
- Cannot view Custom Post Type no matter what I try