1. Home
  2. Docs
  3. Premium Data Services
  4. Remote Connection Wizard

Remote Connection Wizard

The remote connection wizard is part of our premium data services and allows premium users to make heterogeneous external data sources available to their WordPress back-end and front-end. Two types of remote data sources are supported:

  1. Remote database connections
  2. Remote data files (no programming skills or database knowledge required)

Remote database connections

Remote database connections are supported for the following database management systems:

  • MariaDB/MySQL
  • ProgreSQL
  • Microsoft SQL Server
  • Oracle
  • Microsoft Access (handled as remote data file)

The remote database needs to be accessible from our data server. Data is not cached or replicated on our server (only Microsoft Access files are cached).

Remote data files

The following file types are supported:

  • Microsoft Access MDB
  • Microsoft Access ACCDB
  • CSV file
  • JSON file
  • XML file

Remote data files need to be accessible via a public URL. The remote file is loaded (cached) onto our data server and imported into our database. A database table is created automatically and requires zero configuration. A refresh interval can be defined per remote data file, which reloads the data file and updates the database table automatically.

Setup

To use the remote connection wizard, you first have to enable our premium data service on your WordPress server. Please follow these instruction…

Usage

Plugin tools

Tables created from a remote database connection or remote data file, are available to all WP Data Access tools. Just select your table to create a publication, project or chart as you would do with a table stored in your WordPress database.

Custom PHP code

Tables can be accessed from PHP code as well. Here is a template:

<?php

function heterogeneous_connection_example() {
	$wpdadb = WPDataAccess\Connection\WPDADB::get_db_connection( 'rdb:wpdafree.youniquedata.com' );
	$rows   = $wpdadb->get_results( 'select * from my_table' );
	foreach ( $rows as $row ) {
		// Process table row...
	}
}

add_action('plugins_loaded', 'heterogeneous_connection_example');

?>

The code example above connects to remote database rdb:wpdafree.youniquedata.com. Class WPDADB is a sub class of WordPress class wpdb. If you are fimiliar with the wpdb class you can easily use wpdb method like query, get_results, insert, update, delete, and so on, to access your remote data.

Was this article helpful to you? Yes No

Leave a Reply

Your email address will not be published.