Hey everyone, I'm really new to Symfony and am working on an app on 1.4. I could use some input on some logic I'm working on and hope someone here could point me in the right direction.
Currently, I'm working on a simple search module (not one for jobeet or using zend search) that queries multiple tables with some text that the user puts in. The text entered by the user could be found in one or more of three tables: Items, Quests, Npc. All of the found results will display on the search action of the search module.
What I'd like, is that the results show on the search action as links to the proper module (Item, Quests, Npc respectively), but ONLY if there are results of that type found. Example( if quest and item match are found, but not NPC):
Your search found 1 Item:
Item 1
Your search found 1 quest:
Quest 1
Since there were no NPCs found, there was no need to even tell the user there weren't any, so it is omitted. Here's where I run into trouble. I'm not really sure HOW to go about doing this. I could just cop-out and use if statements in the searchSuccess.php and only show those if the count() of the arrays were greater than 1, but that sort of defeats the purpose of mvc, right? Is this the only logical solution to making this happen, or is there another way I'm not seeing?
I'd really appreciate any and all feedback.
