Retrieve and display data from custom db table in admin area?

Working code for adding widget to wp dashboard with information from custom DB: /** * Add application widget to the dashboard. */ function addApplicationWidget() { wp_add_dashboard_widget( ‘submitted_applications’, ‘Submitted Applications’, ‘showApplicants’ ); } add_action( ‘wp_dashboard_setup’, ‘addApplicationWidget’ ); function showApplicants() { global $wpdb; $appTable = $wpdb->prefix . “applications”; $query = $wpdb->prepare(“SELECT * FROM $appTable WHERE %d >= … Read more

Storing textbox values in Database

From PHP to WordPress If you are experienced in programming and in PHP, you know that saving data coming from a form basically involves these steps: validation sanitization connection to database store value in database even if “plain” PHP would work for all of them, WordPress has helpers and specific best practices for them. Validation … Read more

How to merge local and live databases?

If you just merge the local DB into the production DB it actually means that your local install is a production as well. The problem is not with the ability to perform merge, the problem is that you don’t have a separation between production staging and dev servers. DB on dev installs are likely to … Read more