I have the following function declared:
----------------------
function rescount($flag) {
$cnt = $db->get_var("select count(SR_ID) from STATION_RESOURCES
where SR_FLAG = '$flag'");
if ($cnt > 0) {
$cntl = ' [' . $cnt . ']';
echo $cntl;
}
}
----------------------
and am passing it the following variable:
<?php rescount('b'); ?>
and am getting the following error msg:
----------------------
Fatal error: Call to a member function on a non-object in
/path/to/script.php on line 8
----------------------
I've tried rewriting this several different ways, all to no avail.
What's giving me that error?
Thanks,
-Bob
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/