ExternalDB

Updated with multiple domains, repackaged and added support for non-standard port numbers
* Updated the documentation due to (un)popular demand! :) *
After installing this very simple but powerful extension, I soon got results out my external database with a bit of coding and trial and error, absolutely fab, worked like a dream and I recommend that anyone who wishes to get external data to use this.
The documentation is brief and I couldn't quite work out how to display the data from the example but I got around displaying results using Dreamweaver's clunky old code to retrieve the data - I must add that I did NOT use Dreamweaver to establish the database connection - that's what this plug in does. Anyway, here's my example code which may help others until someone puts the right answer on this thread - if anyone can contribute or put me right on this then please do.
// Create new ExternalDB instance, using the details that we set earlier.
$dbxo = new externaldatabase ( 'put_the_name_of_your_database_here' );
// Create a new jDatabase object, connected with the details from the above selected DSN.
// We call ExternalDB objects $dbx just as a standard practice
$dbx = $dbxo->getDB ();
$query_whatever = "SELECT * FROM my_database_table WHERE some_field='some_value'";
$whatever = mysql_query($query_whatever) or die(mysql_error());
$row_whatever = mysql_fetch_assoc($whatever);
$totalRows_whatever = mysql_num_rows($whatever);
echo $row_whatever['the_database_column_name'];
Thats it - it works very well.
Many thanks to the developer for getting me out of a big hole!!
I've updated the original (read: poor) documentation to something that should aid developers and help those trying to work out what this plugin does and does not do. Thanks for the rating!






