close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Turning off display of zero or 0.00

Thread began 7/12/2021 12:59 pm by dhagood355349 | Last modified 7/22/2021 12:15 pm by Ray Borduin | 66 views | 16 replies |

dhagood355349

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?

Sign in to reply to this post

Ray BorduinWebAssist

Just add an IF statement to not display it. I'd need specifics to give the exact code.

Sign in to reply to this post
Did this help? Tips are appreciated...

dhagood355349

Zero

See private

Sign in to reply to this post

Ray BorduinWebAssist

What do you want not displayed if the value is zero?

Sign in to reply to this post
Did this help? Tips are appreciated...

dhagood355349

Zero to blank

empty field, blank

Sign in to reply to this post

Ray BorduinWebAssist

<?php echo($WADAAFTDirResult->getColumnVal("Final_Weight")?$WADAAFTDirResult->getColumnVal("Final_Weight"):""); ?>

Sign in to reply to this post
Did this help? Tips are appreciated...

dhagood355349

Zero to blank

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.

Sign in to reply to this post

Ray BorduinWebAssist

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.

Sign in to reply to this post
Did this help? Tips are appreciated...

dhagood355349

Zero to blank

See Private

Sign in to reply to this post

Ray BorduinWebAssist

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"):""); ?>

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...