Error when Attempting to connect to external Db

Permalink 1 user found helpful
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'ADODB_mysql::debug' was given in /httpdocs/concrete/libraries/database.php on line 73

$db = Loader::db( DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_DATABASE2, true);
$db->Execute('select * from products WHERE products_code =60000001');



I am attempting to connect to an external database to pull some extra information in the only difference is the DB_DATABASE2 as the user has privileges on both tables.

But I am unable to run $db2->Execute() or $db->query($q);

Can anyone point out what I am doing wrong?
Thanks

TheRealSean
 
TheRealSean replied on at Permalink Best Answer Reply
TheRealSean
I think I have managed to answer my own question, I needed to assign the Execute to a variable.

I am not sure if this is the correct way to do it but I used
$prodDetail = $db->Execute();

then was able to use
$prodDetail->fetchRow();
TheRealSean replied on at Permalink Reply
TheRealSean
Always nice when a google search returns your own question ;) and allows you to rediscover the answer.
tonidomenech replied on at Permalink Reply
tonidomenech
The same thing happens to me, I can help?