Displaying category selections in pre-determined to implement Business Directory
I have implemented the EPC here as a Member Business Directory: http://www.nvfpc.org/findaprofessional.php
Now I would like to list it sorted by business type. So I think I would take the category 'Members' and create selections such as Assisted Living, Caregivers, Financial Services, etc.
To show the list, I would have repeated lines of code where I would change the category ($showCat) then call calendar.php repeatedly such as: (assume for now that other variables would be set also)
HTML Code:
<p>Assisted Living</p>
PHP Code:
<?php $showCat="a|2|6"; $template="mytemplate.php"; require ("calendar/calendar.php"); ?>
HTML Code:
<p>Caregivers</p>
PHP Code:
<?php $showCat="a|2|8"; $template="mytemplate.php"; require ("calendar/calendar.php"); ?>
etc.
Questions: Is this a good way to implement this?
Would this adversely affect the server by having repeated calls to the database?
|