Dave Rexel
|
Posted: 05/04/2002, 5:08 AM |
|
howto use CCGetDBValue($sql, $db)
in the before show Custom code block
I keep getting errors
Fatal error: Call to a member function on a non-object in
c:\inetpub\wwwroot\NewProject3\eko_trans__list1_events.php on line 22
an example would good
|
|
|
Dave Rexel
|
Posted: 05/04/2002, 12:32 PM |
|
SOLVED : Re: howto use CCGetDBValue($sql, $db)
I took a deep breath and scratched unwillingly in CC code
function eko_trans_out_mysum_BeforeShow() { //eko_trans_out_mysum_BeforeShow
@34-6C3823F0
//Custom Code @36-2A29BDB7
// -------------------------
// Write your own code here.
global $eko_trans_out;
//#### YOU HAVE TO FIND WHAT CCS NAMES YOUR CONNECTION
//####MAKE IT GLOBAL IN THIS PLACE
global $DBConnection1;
//####TEST CODE
$sql = "SELECT SUM(eko_amount) FROM eko_trans_out";
//####NOW USE THE COMMON FUNCTION
$myLookup = CCGetDBValue($sql, $DBConnection1);
$eko_trans_out->mysum->Value = $myLookup;
// -------------------------
//End Custom Code
"Dave Rexel" <therex_spamenot@hotmail.com> wrote in message
news:ab0j0o$spm$1@news.codecharge.com...
> howto use CCGetDBValue($sql, $db)
> in the before show Custom code block
>
> I keep getting errors
>
> Fatal error: Call to a member function on a non-object in
> c:\inetpub\wwwroot\NewProject3\eko_trans__list1_events.php on line 22
>
> an example would good
>
>
>
|
|
|
|
|