I am trying to create a form that will pull records from a different database (located on same server). I need to use the DB Multi Record Loader (I think), but I cannot see a way to configure it for an external database. Is there a way to do this?
Forums
Multi Record Loader - Data from external database
Hey Bob!
I had checked there, but there is no option. The DB Save action has this on the advanced tab, but not DB Record or DB Multi Record loaders.
I had checked there, but there is no option. The DB Save action has this on the advanced tab, but not DB Record or DB Multi Record loaders.
Hi Rick,
Sorry, I never noticed that wasn't there :-(
Then I guess it's back to hand-coding . . . the code for CFv3 is in this document I think it should still work for CFv4.
Bob
Sorry, I never noticed that wasn't there :-(
Then I guess it's back to hand-coding . . . the code for CFv3 is in this document I think it should still work for CFv4.
Bob
Thanks!!
Perhaps Max could get this in a future release? That would really be awesome!
Perhaps Max could get this in a future release? That would really be awesome!
Bob,
I am thoroughly LOST on this. I have the following in a Custom Code action on a form:
which does absolutely nothing. I need to be able to query and display information from another database on the same server (same hosting account) in a CF form. Can you please help?
Thanks!!!
I am thoroughly LOST on this. I have the following in a Custom Code action on a form:
<?php
$option = array();
$option['driver'] = 'mysql';
$option['host'] = 'localhost';
$option['user'] = 'REDACTED';
$option['password'] = 'REDACTED';
$option['database'] = 'REDACTED';
$option['prefix'] = '25teac_';
$db2 = & JDatabase::getInstance( $option );
$query = "SELECT name FROM #__users WHERE id = 43";
$db2->setQuery($query);
$result = $db2->loadResult();
echo $result;
?>
which does absolutely nothing. I need to be able to query and display information from another database on the same server (same hosting account) in a CF form. Can you please help?
Thanks!!!
Bob,
I gave up on this, but came up with a better (and much simpler) solution. The two different databases were both for the same client. One was for the main site and one for a classroom site. I just merged the classroom tables into the same database as the main site, but with their different prefix. One configuration change to the classroom site and presto - ALL tables are now easily accessible from CF in either site.
It would still be VERY helpful if Max could integrate the connection settings right into the DB Multi Record Loader, especially for idiots like me!!
I gave up on this, but came up with a better (and much simpler) solution. The two different databases were both for the same client. One was for the main site and one for a classroom site. I just merged the classroom tables into the same database as the main site, but with their different prefix. One configuration change to the classroom site and presto - ALL tables are now easily accessible from CF in either site.
It would still be VERY helpful if Max could integrate the connection settings right into the DB Multi Record Loader, especially for idiots like me!!
This topic is locked and no more replies can be posted.