CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 get_db_value problem

Print topic Send  topic

Author Message
Jeri2001
Posted: 10/08/2002, 2:24 AM

I have a statement
$iCount_advertisers = get_db_value("SELECT count(*) FROM pb_advertisers WHERE zone='$pzone' AND topic='$ptopic'");

$pzone and $ptopic have values. Everything is fine except when the count is 0. For some reason $iCount_advertisers does not equal 0. I echo the query and run it in PHPMyAdmin and get 0.

The result is fine except for that one occurence. So I thought of coding if $iCount_advertisers < 1 then $iCount_advertisers == 0. Unfortunately if there are no records this doesn't work.

Any ideas?

Thanks,

Jer
Banging head against wall
Krala
Posted: 10/09/2002, 6:05 AM

Hello,
Check the $iCount_advertisers value before function execute. To track what is working incorrect look at common.php and add print code for the sql execution results.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.