Filter Results on Page

7 posts by 2 authors in: Forums > CMS Builder
Last Post: July 1, 2011   (RSS)

By KCMedia - June 27, 2011

Hi

I have this page called roomsDetail.php that just list the details of the room that someone would click on the home page of the site and it will show just on that room.

This works great but now i have to ad a new section to the system that has all the staff profiles on it and some staff work only in one 1 room or some in 2 and some in 3 so i setup a multi section and called the table in the cmsb that holds the room names and i have a check box multi selector that you just tick what room they work in.

this works ok but now i want to just show the people that are working in that room only but this wont work how can i go about this.

this is the link to the site www.waggachildcare.com.au/index.php
then click on any of the rooms and the director Rebecca should be in each room but the person called test should only be in Discovers room and not the others.

I have included the roomsDetail.php page also.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz
Attachments:

roomsdetails.php 8K

Re: [kcmedia] Filter Results on Page

By robin - June 28, 2011

Hey Craig,

Check Box multiselects are stored in the database as tab separated values.
A staff search like this might be helpful:

list($staff_profilesRecords, $staff_profilesMetaData) = getRecords(array(
'tableName' => 'staff_profiles',
'where' => "room LIKE '%\t" . $centre_roomsRecords['num'] . "\t%'"
))


Hope that helps,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] Filter Results on Page

By KCMedia - June 28, 2011

Hi Robin

no that didnt work it wont show any records now.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] Filter Results on Page

By robin - June 29, 2011

Hey Craig,

You might need to change some of the variable or column names since I was just guessing what you might have called them.

If you're still having trouble you can fill out a [url http://www.interactivetools.com/support]2nd level support request[/url] with a full description of your problem and we can take a look into this for you.

Robin
Robin
Programmer
interactivetools.com

Re: [robin] Filter Results on Page

By KCMedia - June 30, 2011

HI Robin

I have done that and still dosnt work.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] Filter Results on Page

By robin - July 1, 2011

Hey,

Ahh, I think I made a little mistake with that code. It should be $centre_roomsRecord not $centre_roomsRecords
'where' => "room LIKE '%\t" . $centre_roomsRecord['title'] . "\t%'"

Hope that gets this all resolved!
Robin
Robin
Programmer
interactivetools.com