If you intend the process to be portable, then don’t use the database. Modify the theme to reply with either raw-html or php-serialized data and just do an http crossload.
If this is a one-time install and you don’t care at all about portability, then just hardcode the query.
I’ve done both at one point or the other, there isn’t much difference in implementation time. The queries occasionally have to be redone after an upgrade.
Related Posts:
- Copying database tables to new database
- Is it fine to have foreign key as primary key?
- Detecting errors generated by $wpdb->get_results()
- wpdb update add current timestamp not working
- Custom form that store input in database
- Restoring WordPress posts from database only
- Displaying content from one WP site on separate WP site
- Lost the `wp_options` table: what’s the best way to restore the site?
- Issue with wp_insert_post and post_content field error Could not update post in the database
- wp_posts – guid update
- Performance Gains of Relational DB Setup
- How to move existing WordPress wp-content folder along with database to new server and new domain name?
- store simple data in get_option()
- How might I retrieve a featured post image from an external WP site and display it as a link back?
- What are conventions about the schema of the $table_prefix
- Migrating non-WordPress CMS to WordPress, lots of data to move — possible solutions?
- BuddyPress: What’s the use of wp_bp_xprofile_data table and how does it get updated? [closed]
- storing database in version control
- Is deleting orphaned wp_options entries safe?
- How to build a movie database with wordpress?
- What’s the most efficient database method to add and query usermeta?
- How to solve slow WordPress site caused by attachment_metadata
- Sub-domain or 2nd, temporary different domain?
- How do i get user data from a custom table in the wordpress database by user ID?
- Converting WordPress into Android or iPhone app
- Safe way to find last inserted id in a table?
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Database slowdown after update to 3.4.1
- WooCommerce sku location in DB
- How to insert data into MySQL database from the form created in WordPress site
- Emoji support and MariaDB 10.0.30-
- WordPress DATABASE Update Manually?
- Which is more efficient? Using usermeta, or creating a new MySQL table?
- Can I have multiple database users within WordPress?
- How do I copy a wordpress database?
- Export all content from wordpress
- Modify Database in Multi-Site wp_usermeta table
- Form Data not getting stored in WordPress database
- Hook directly into query execution
- Structure of postmeta meta_value for woocommerce product download
- $wpdb doesn’t like to store arrays
- Connect to a remote database for wordpress in my own hosting server
- WordPress ‘repairing database’ in a constant error loop?
- What Is the Proper Way to Merge Usermeta Table to a an existing WP Database?
- Importing CSV into database table not working?
- Check if an option exists and get its value in one hit
- Change options table prefix only
- Problems with moving my WordPress site to another domain/server
- Is it important to have integers inserted using %d rather than %s?
- Export a custom Mysql database product catalog to WordPress
- Any risk to changing WP table col CHARACTER_MAXIMUM_LENGTH?
- Global__r connection timed out
- Connect to database in the header of my WordPress website
- Should I store critical css in the database or in my theme’s filesystem?
- WordPress url transformation script
- Location of WP default mySQL tables creation file?
- Is it risky if I update all url in the database due to my site url changed?
- Select From wpdb – Author/User Directory page
- Just created a WordPress Table can’t get $wpdb get row to work – need help
- Need help fixing sql syntax error after WP 3.2 upgrade
- Need help with creating a searchable user data by name or specific number like ID
- $wpdb->insert not inserting all rows
- Intentionally corrupt WordPress database
- How to re-connect WP files in lampp/htdocs to new SQL database to recover site under development
- How can I find user role in Mysql?
- How would I see which wordpress posts have a revision history without opening each one?
- Creating a custom form with ability to query and submit to SQL
- Troubles when I want to connect to another DB
- Intermittent Yet Problematic Error – “Error Establishing A Database Connection”
- Can I use a wpdb object to connect to a non-WordPress Oracle database [duplicate]
- Featured image from custom to WordPress database
- WordPress Database Query works in phpMyAdmin but not in the code
- Error: SHOW FULL COLUMNS FROM `pt_participant`
- update to a new template without loosing any data
- Do I need to be selective about where I search and replace when pointing a domain to a subfolder used for development?
- How to save dropdown slection by a user in the DB
- Form display in new page
- Accessing Information From Vendor Database On The Basis Of Customer Query
- spambot registering without providing email or password, bypassing registration process
- Connection of mysql DB with wordpress
- Locally installing wordpress. Database problem
- I have my full special database from xampp how can i use this on wordpress?
- Halting data inserts for future refresh of post?
- Possible to restore wordpress database from mysql56 and sqlite files?
- Correct permissions for SQLite database
- Processing a lot of $wpdb isn’t insert all the data
- How do i get value from wp_postmeta?
- Local host to server import problem
- Restoring .sql backup results in “Error establishing a database connection”
- Link to handle $_GET request
- “MySQL server has gone away” since update to 3.8
- featured image not showing up with mysql_connect
- Getting deleted users in database
- Options of accessing wordpress data from mobile app
- Getting data from a table using a query
- Database interaction (private-public) [closed]
- SQL query to rewrite all media URLs to end with .webp
- Many images in wp-content/uploads folder that are not in Media Library
- Order of search results based off of a backend custom field and also in alpha order
- How to find fresh (last modified) and sql backup?