close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

hide record based on date

Thread began 7/09/2014 6:24 am by Jamie | Last modified 7/09/2014 12:51 pm by Jason Byrnes | 780 views | 7 replies |

Jamie

hide record based on date

Hey Jason

I have been using this thread as a reference.

What I have is a list of presentations that are made at a bi-weekly networking group. The list is sorted by PresentationDate ASC and I want the topmost record to becom hidden the day after the meeting it is relevant to (eg if the meeting was today 9 July then I would want to the topmost record to become hidden on 10 July)

Basically, I have set the rules manager as per that referenced thread and named the rule 'HideDate' and bound the 'compare to' to the column PresentationDate in the db but this hides all records in the list rather than just the topmost.

I am thinking at this point that the show if route is not the way to go and that it would need something in the recordset itself to achieve what I am trying to do.... just not sure how?!

I have attached the files

Many thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

Since you arew using a dynamic date, the security assist show region wont work.

you can add a where clause in the SQL to do this though:

WHERE DATE_FORMAT(DateColumn, "%Y-%m-%d") < (CURDATE() + INTERVAL 1 DAY)


where DateColumn is the name of the date column in the table.

Sign in to reply to this post

Jamie

thanks Jason I thought that would be the case...

I have added that to the recordset and get the following error: Parse error: syntax error, unexpected '%' in /home/blandfft/public_html/meeting-info.php on line 96

Also, how would I incorporate that to SELECT *, member_info.* FROM presentations INNER JOIN member_info ON MemberNameID = MemberID WHERE Live = 1 ORDER BY PresentationDate ASC ?

Sign in to reply to this post

Jason ByrnesWebAssist

"I have added that to the recordset and get the following error: Parse error: syntax error, unexpected '%' in /home/blandfft/public_html/meeting-info.php on line 96"

i would need to see the code


"Also, how would I incorporate that to SELECT *, member_info.* FROM presentations INNER JOIN member_info ON MemberNameID = MemberID WHERE Live = 1 ORDER BY PresentationDate ASC ?"

WHERE Live = 1 AND DATE_FORMAT(DateColumn, "%Y-%m-%d") < (CURDATE() + INTERVAL 1 DAY)

Sign in to reply to this post

Jamie

thanks thats what I thought... have added the file to the PM area

Sign in to reply to this post

Jason ByrnesWebAssist

use single quotes instead of double in the date format:

DATE_FORMAT(DateColumn, '%Y-%m-%d') < (CURDATE() + INTERVAL 1 DAY)

Sign in to reply to this post

Jamie

brilliant. many thanks Jason

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

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