In the current implementation, a new record is always added to the database because the code does not verify the value of the wish ID transferred from the input form. Oracle Database users: Click here to download the source code that reflects the project state after the lesson is completed.
This article describes how to have your plugin automatically create a My SQL/Maria DB table to store its data.
Also if necessary change the table prefix values where applicable (ie wp_ ) UPDATE wp_options SET option_value = replace(option_value, ' ' WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, ' UPDATE wp_posts SET post_content = replace(post_content, ' ' UPDATE wp_postmeta SET meta_value = replace(meta_value,' protected][~/Desktop]: mysql -u root -p databasename Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the My SQL monitor. Your My SQL connection id is 892 Server version: 5.5.13 My SQL Community Server (GPL) Copyright (c) 2000, 2010, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. mysql UPDATE wp_options SET option_value = replace(option_value, ' ' WHERE option_name = 'home' OR option_name = 'siteurl'; Query OK, 0 rows affected (0.00 sec) Rows matched: 2 Changed: 0 Warnings: 0 mysqldefine('DB_NAME', 'databasename'); /** My SQL database username */ define('DB_USER', 'username'); /** My SQL database password */ define('DB_PASSWORD', 'password'); /** My SQL hostname */ define('DB_HOST', 'localhost'); Now everything should link up perfectly.
Other names may be trademarks of their respective owners. djave has created a nice and easy script that takes the old and new URLs and hands you the sql code for the Word Press swap, nice!
After migrating a Word Press site to a new URL either live or to a production or development server, the new URL strings in the mysql database need to be changed and updated in the various mysql database tables.
Note that as an alternative to following the steps here, you could have the plugin user run an install script when they install your plugin.
Another approach would be to have the user execute an SQL query on their own, using something like php My Admin.
It is a typical situation when you need to update baseline data used by a checkpoint in order for the checkpoint to pass.
Test Complete allows updating the baseline data of database checkpoints either at runtime or from the test log after the test run is over.