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

Show Hide Advice Sought (not urgent)

Thread began 8/24/2010 1:48 pm by neilo | Last modified 8/25/2010 9:33 am by neilo | 872 views | 3 replies


Show Hide Advice Sought (not urgent)


I have a recordset which fetches values from a db, one field of which is 'eventTime' , there is a div (gigTime) which displays the time:

<div class="gigTime" id="GigTime"><?php echo date('g:ia',strtotime($row_calendar['event_time'])); ?></div>

In the database, the time function displays (for example) 09:44:00 - but I have set it to show (for example) 9:44pm.

All is fine, but if no time is entered into the record (i.e. if it is an all-day event) then the time of the gig is shown as 12.00am (or 00:00:00).

So I want to be able to show/hide the div gigTime depending on the eventTime value, i.e. IF the time as returned by the query equals 00:00:00 or 12.00am, then the div should be hidden (and if it doesn't equal 00:00:00 or 12.00am, then it is shown).

I have tried sorting this with the WebAssist 'Show if' server behavior:

if ("".$row_calendar['event_time'] ."" != "00:00:00") { // WebAssist Show If
<div class="gigTime" id="gigTime"><?php echo date('g:ia',strtotime($row_calendar['event_time'])); ?></div>
} // ("".$row_calendar['event_time'] ."" != "00:00:00")

I have aslo tried it with 12.00am, and with == instead of != but I can't get it to work.

This is where my tag-line pays off. Advice would be appreciated.


Attached Files

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





Ease of use


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...