The best way would be to use the built-in Options API to add info to the wp_options table.
To add the option:
http://codex.wordpress.org/Function_Reference/add_option
To read the option value:
http://codex.wordpress.org/Function_Reference/get_option
Related Posts:
- Strange issue saving custom field data for a WooCommerce order
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- Can I log the searches that are returning 404 in the DB?
- How can I add an image upload field directly to a custom write panel?
- Post meta vs separate database tables
- Is it mandatory to use $wpdb->prefix in custom tables
- Update Option Stored in Multi-Dimensional Array
- How do I improve this admin query snippet to avoid generating duplicate results on non-meta searches?
- How to validate custom fields in custom post type?
- How to add tab which is visible only in admin side of product in woocommerce? [closed]
- Default table collation on plugin activation?
- Using a database view = evil incarnate?
- Writing a plugin that notify my friends of new post that mentions(@) them
- Getting wrong relationship value in $args in wp_Query?
- WordPress and multithreading
- Creating custom field with drop down on new post page
- Not sure the best way to save custom plugin data
- The ideal place for storing persistent PHP objects
- What is the correct way for plugins to create tables with special charset/collation considerations?
- wpdb->prepare and mysql UPDATE – how is it done?
- dbDelta SQL Query Not Working
- dbDelta not installing database
- Is it necessary to do validation again when retrieving data from database?
- Checked() function on a multidimensional array
- Plugin: database creation
- Adding columns to core tables
- Delist entries in the_loop
- How to query custom db table?
- Delete data from database using row action
- Show dynamic list of products from custom api of another database under same host
- Remove entire [$key] from array stored in custom field using Ajax – unset($array[$key]); not working
- How do I have now a duplicated user entry if this is not allowed (and I cannot replicate it)?
- How can I add a simple custom field to my plugin?
- Ajax is not working in a loop
- Alternative functions for mysql_free_result and mysql_ping in wordpress functions
- Make Database query only when option is updated
- Can we intercept user_login and user_pass from a wp_login_form?
- How best to handle database version dependence (from $wp_db_version)
- WP: Search and replace in DB programmatically
- Using AND and bracket grouping in SQL not working
- How to save post meta as an array in Gutenberg?
- Issues Updating Post Meta with AJAX (Seems simple but cannot figure it out)
- Two different wordpress sites – same server and IP address. Gaining Access to database 1 of 2
- per blog metadata for plugin
- How to format custom fields when editing an attachment?
- Plugin Development: Storing and Manipulating Data That Fits JSON in Database
- What might be the reason of Couldn’t fetch mysqli_result on another domain?
- How do I debug an error that a plugin is causing?
- Save temporary registration data
- Any way to update_post_meta with html content? It gets stripped and becomes empty
- Update plugin settings option_name for big plugin update
- $wpdb->update Issue
- dbdelta failing with error: “WordPress database error Table ‘wp_2_myPlugin’ already exists
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- how to add custom fields into new & update post page?
- Customise Grouped Product display in Woocommerce with custom column
- Error code when migrate
- Why User_login key doesn’t work with wp_update_user()
- WP_Query not ordering correctly
- Adding customs fields on each product on the cart
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- WordPress how do I echo SUM from a column of a MySQL table by user id AND type_operation
- WordPress Fatal error: Uncaught Error: Call to undefined function dbDelta()
- add_meta_box does not display meta box in Admin
- Use admin-post to submit form data to external database
- Save in my custom admin page and redirect to the saved object
- Relational / Associate tables using native WordPress functionality
- WordPress doesn’t create table on plugin activation
- Insert Data into Database
- Update database record in plugin
- How to store in the database directly the translation?
- Displaying Custom Post Meta
- pull data from wordpress database
- Ajax not working to insert, query and result data
- Why Worpdress doesn’t create table in database?
- Form and database, plugin development
- How to filter get_adjacent_post()?
- Associating special meaning with user id 0
- What method should I use to store my plugin data (multi level menus with options on each item)
- How to add additional field in a table row after creating a table?
- WordPress plugin tables become corrupt
- Post data in wp-admin to external database
- How can i call from custom fields to the category editor?
- I want to display the content of a text field only if it has been entered
- How can I get a plugin to hook ‘dbdelta_queries’ — a filter used during version update?
- Running one-off cron jobs when WP_DISABLE_CRON is true: can I hit /wp-cron.php?
- Create Unique and Customized User ID for Website Members in WordPress
- How to create a database table in WordPress using PHP
- Leveraging Core Functionality in Icon Upload Plugin [closed]
- Programmatically creating posts based on external JSON feed (asynchronously)
- WordPress database error: [Table ‘bitnami_wordpress.questions’ doesn’t exist]
- Making a user platform reachable by a qr code on a pin-back-button [closed]
- multiple record insert creating many duplicate records
- Custom fields in the billing address section woocommerce
- Custom Plugin Breaks Other Plugin Functions
- Add File field in WooCommerce Box office plugin
- Custom database table entry edit page
- Update Cache on Save Instead of Clearing It?
- Images stored from external API not loading
- Is there a way to force plugins to use Flyway migrations for database changes?