So, this is my second week of PHP coding, and I'm getting alright. But I would appreciate a couple of starting tips for my first custom module hack...

Um, my site could really do with a particular kind of taxonomy search: one that lists several different vocabularies ("Location" and "product type" and "business type" in my case) and allows the user to select multiple terms from each. It will find nodes which possess any of the terms in each vocabulary, and return the common nodes from each of these lists. So, logical OR within vocabularies and locial AND betwixt them. I don't think that taxonomy module vanilla or typecat.module does that, but correct me if I'm wrong.

This logical ANDing and ORing... should I be doing this using SQL queries based on tid or with some temporary arrays in PHP?

Disclaimer: Er, so I'm not quite sure what taxonomy_browser does, because it has always flatly refused to do anything other than produce an empty page for me... Nonetheless, I believe it might do something similar to what I want, so I'm going to examine it for hints. Yes indeed. And if I can work out why it doesn't work for me, I'll post a patch too. Poor taxonomy browser module. Four open issues and no love.

With respect as always to the support folks on this forum. Thanks for making my first few sites easy.

Comments

micha_1977@drupal.org’s picture

depends...

as long as you are using primary keys and/or table indexes you can go with sql queries, sql can be quite fast that way

but you should avoid to much queries, some users have their database on another server and with much queries it would take some serious amount of time to end the script

-micha

sepeck’s picture

Can't help you with the coding, but you might look at the devel module to help you troubleshoot stuff
http://drupal.org/project/devel

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide