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

Filter data in select to omit records related to logged in user.

Thread began 3/01/2011 12:57 pm by troyd | Last modified 3/21/2011 10:45 am by troyd | 1940 views | 16 replies

troyd

Ok. Now that one is doing some weird stuff at the moment.

I changed the stand-in user id of 5 to the ParamUserID in both locations. And added tblbooths.booths_id to the select. But other than that I used it as is. And what I get is all event dates showing up in the drop down at first. But as soon as the user registers for even one date, they all disappear accept one date. And that one date depends on who is logged in.
And if all three users are registered for the same date, all users loose any dates as a choice. So the dropdown is now blank for everyone. Strange.

For reference, this is what I tried from your provided code. (I'm still trying other stuff but wanted to give an update).

SELECT tblbooths.booth_id, users.UserID, show_date, UserFirstName, UserLastName, reserved
FROM tblbooths
left JOIN tblreserved ON tblbooths.booth_id = tblreserved.booth_id
left JOIN users ON users.UserID = tblreserved.UserID
WHERE (coalesce(tblreserved.UserID != ParamUserID,1=1) AND (coalesce(tblreserved.booth_id NOT IN (SELECT booth_id FROM tblreserved WHERE UserID = ParamUserID),users.UserID>0)))



Thanks,
TroyD

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