Reposting here - Cannot connect to other MySQL dbs

13 years 1 month ago - 13 years 1 month ago #157984 by krileon
A query returning no data is a working query, but with no results. You still have yet to provide the query so I can't suggest perhaps a bug with the query. If it has anything to do with querying CB data then of course that could be the issue if database structure changed. Couldn't tell you off the top of my head if it has as 1.2.3 to 1.4 is a big upgrade.

CB has nothing to do with Joomla articles so I don't see the relation. Joomla articles also don't allow PHP in them, so you're likely using an editor plugin to allow this. If is the case you should still be using Joomla API to make your query, there's no need to make a database connect unless it's to an external table.

Not much more I can advise, sorry.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 1 month ago #157991 by djc
Again, I am sorry that I am not clear....I realize a query returning no data is a working query. However, I can never get to the query stage. I cannot connect to my external database in order to make the query to the external table. That is why I am not using the Joomla (or CB) API.

I also don't see the relationship between CB and Joomla articles, but the fact remains that the only change made to a site working for months and freely connecting to this external db was the CB upgrade.

Are you suggesting that perhaps I should upgrade to some interim versions between 1.2.3 and 1.4?

Thanks for your input, but I am at a loss as where else to look.
Dom

Please Log in to join the conversation.

13 years 1 month ago - 13 years 1 month ago #157996 by krileon

Again, I am sorry that I am not clear....I realize a query returning no data is a working query. However, I can never get to the query stage. I cannot connect to my external database in order to make the query to the external table. That is why I am not using the Joomla (or CB) API.

Joomla and CB API both allow external database queries. See professional subscriber incubator project CB Queries (plugin.cbqueries.php) for examples on how. You can also review the code snippet below.
if ( is_callable( array( 'JDatabase', 'getInstance' ) ) ) {
	$options		=	array ( 'driver' => $driver, 'host' => $host, 'user' => $username, 'password' => $password, 'database' => $database, 'prefix' => $prefix );
	$_J_database	=&	JDatabase::getInstance( $options );
} else {
	$_J_database	=	new Database( $host, $username, $password, $database, $prefix, false );
}

The above would create an API based connection to an external database. You then just use $_J_database object to make your calls such as the below.
$_J_database->setQuery( 'SELECT `id` FROM `my_table`' );
$_J_database->query();

No idea what you're using to make queries through an article, but again I see no relation to CB. It could also be a conflict between CB and say an installed CB plugin for all I know. Best approach is to disable CB and Joomla plugins 1 by 1 until you find the culprit.

Are you suggesting that perhaps I should upgrade to some interim versions between 1.2.3 and 1.4?

No, installing just 1.4 will upgrade fine.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.191 seconds

Facebook Twitter LinkedIn