Display listings by category?
2 posts by 2 authors in: Forums > CMS Builder
Last Post: June 13, 2012 (RSS)
By nikibrown - June 12, 2012
Hey!
I created a directory listing that has a category section. I have this set up as a radio button selection (see screenshot: http://cl.ly/1f10153J363n220A3i2z )
I'm wondering what the syntax for listing all the entries of a specific category is? I'm imagining its in the 'where' section.
I know the checkbox values are 1 and 0 but wasnt quite sure how the values of the radio buttons were stored. I'm trying to list directory listings by specific categories like this: http://shoptowncenter.com/directory.html
Thanks!
I created a directory listing that has a category section. I have this set up as a radio button selection (see screenshot: http://cl.ly/1f10153J363n220A3i2z )
I'm wondering what the syntax for listing all the entries of a specific category is? I'm imagining its in the 'where' section.
list($towncenter_eventsRecords, $towncenter_eventsMetaData) = getRecords(array(
'tableName' => 'towncenter_events',
'where' => 'featured = 1',
'limit' => 1,
));
I know the checkbox values are 1 and 0 but wasnt quite sure how the values of the radio buttons were stored. I'm trying to list directory listings by specific categories like this: http://shoptowncenter.com/directory.html
Thanks!
Re: [nikibrown] Display listings by category?
By Jason - June 13, 2012
Hi,
Radio buttons are stored the same as drop down lists. The exact information being stored in that field will depend on how you've set up that list.
For example, if you're using straight text, you could write your query like this:
EXAMPLE:
Hope this helps
Radio buttons are stored the same as drop down lists. The exact information being stored in that field will depend on how you've set up that list.
For example, if you're using straight text, you could write your query like this:
EXAMPLE:
list($towncenter_eventsRecords, $towncenter_eventsMetaData) = getRecords(array(
'tableName' => 'towncenter_events',
'where' => "category = 'APPAREL'",
));
Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/