Turning off display of zero or 0.00
I looked through the older replies here, didn't see this, maybe different in mysqli now.
So I have repeated regions created with databridge. Is there a way to turn off the display of 0 or 0.00 in these tables?
I looked through the older replies here, didn't see this, maybe different in mysqli now.
So I have repeated regions created with databridge. Is there a way to turn off the display of 0 or 0.00 in these tables?
Just add an IF statement to not display it. I'd need specifics to give the exact code.
What do you want not displayed if the value is zero?
<?php echo($WADAAFTDirResult->getColumnVal("Final_Weight")?$WADAAFTDirResult->getColumnVal("Final_Weight"):""); ?>
So that makes any value show as blank. Some fields from the SQL db would have values greater than 0.00. Example 5.02. It is the ones that are 0 or 0.00 that I would like not to show in the repeating tables.
That should only make values that are zero show blank. I'd need FTP access to debug, or at I'd at least need to see the code to make sure it was added correctly.
That may be a text field in your database. I had to convert it to a number for the comparison to work... This seems to do the trick:
<?php echo(floatval($WADAAFTDirResult->getColumnVal("Final_Weight")) > 0?$WADAAFTDirResult->getColumnVal("Final_Weight"):""); ?>
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.