It is mandatory, though it is not enforced.
Consider the scenario when two WordPress site has been setup in the same database. One with prefix wp_
and another with wp2_
. If you install your plugin in both of the sites with the prefix, your created tables will be wp_liveshoutbox
for first site and wp2_liveshoutbox
for the second site. But if you omit the prefix, both of the site will be using the same table named liveshoutbox
and the whole thing will break up.
Related Posts:
- WordPress and multithreading
- Actions or filters fired when data is saved in a custom table
- Custom Plugin Database relations
- Activation hook not creating table
- Creating table with plugin is not working
- How to create database table, add data, update and delete using wpdb via plugins?
- Using WPDB to output raw XML fails because of wp-blog-header.php
- wpdb->prepare and mysql UPDATE – how is it done?
- dbDelta not installing database
- $wpdb->update Issue
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- Why doesn’t my Table get created?
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- Update database record in plugin
- WordPress plugin tables become corrupt
- multiple record insert creating many duplicate records
- Should I use wpdb prepare?
- Default table collation on plugin activation?
- Using a database view = evil incarnate?
- Check for success of $wpdb->update() correctly
- Getting wrong relationship value in $args in wp_Query?
- What is the added “complexity” of custom tables?
- How is the data stored in the database?
- How to modify post content before writing to database?
- $wpdb->insert is changing a value
- Retrieving custom fields with $wpdb->get_results
- Is there any reason only 1 (my) IP would be added to this table using $wpdn->insert?
- How to use mysql IN statement with wpdb update method?
- How to store data for posts/pages built with drag-n-drop builder?
- What for the tables ending with the meta used in database of wordpress?
- dbDelta() Error – Incorrect index name ” for query ALTER TABLE
- Update/insert only a column of database table
- How to Create database table when Plugin installed/activated, and delete database when Plugin deleted
- Where to store the name of a custom table?
- include wp-blog-header not working on MAMP
- I’m designing a plugin to create database indexes. Suggestions?
- WordPress database error for query INSERT INTO
- How to connect to AWS RDS external database (not for the core WordPress db)
- SQL query for custom taxonomy slugs
- Issue regarding $wpdb->prepare()
- Error on inserting a form value to database
- Are there any scripts, classes, and/or functions built-in to WP for a plugin to export/import its saved data from wp_options?
- Strange issue saving custom field data for a WooCommerce order
- how to search users by ajax live search
- Form doesnt save to database
- Adding custom end points, No error line
- Intermittent database errors when accessing WordPress database
- Updating Woocommerce Settings API when WordPress Settings API saved and vise versa
- Update results, Before deleting the related category [closed]
- Storing data in wordpress database from ajax call from different website
- Is using custom table to suit business needs instead of transients a big hit to page load speed?
- Create a table with wordpress plugin boilerplate
- Optimising a big WordPress site
- dbDelta SQL Query Not Working
- Can I create a table on my DB without creating a plugin?
- How to access custom WordPress database tables
- What is the best way to store a few fields?
- Delete data from database using row action
- How do I have now a duplicated user entry if this is not allowed (and I cannot replicate it)?
- Issue running db create table query from static method
- 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?
- Two different wordpress sites – same server and IP address. Gaining Access to database 1 of 2
- Plugin Development: Storing and Manipulating Data That Fits JSON in Database
- How to avoid conflicts with db.php / $wpdb and other plugins that decide to use them?
- How do I debug an error that a plugin is causing?
- $wpdb in php 5.5
- Update plugin settings option_name for big plugin update
- select a single val though a table in wordpress
- Plugin to create Posts and Forums then choose category and parent forum
- How to display specific data from a custom table to logged in users with a custom role
- $wpbd->insert_id is returning null
- Error code when migrate
- $wpdb->delete not working for me
- What is my error trying to create a new table in the database?
- How to securely controlling data without keeping it in postmeta?
- Dynamically modify content added to table via javascript
- WordPress how do I echo SUM from a column of a MySQL table by user id AND type_operation
- WordPress Query doesn’t return the correct value
- using wordpress acf shortcods in tables goes outside the table
- 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
- How to store in the database directly the translation?
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- How to implement pagination into a wpdb->result query?
- Displaying settings information in a table
- Ajax not working to insert, query and result data
- Associating special meaning with user id 0
- Google does not index data from custom table used for a plugin
- 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?
- Nothing happens on WordPress Update command
- Fixing plugin for wpdb::prepare
- Can I use an array to create multiple tables?
- How to create a database table in WordPress using PHP
- 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]