I'm building a search class for the module I'm developing. Because of the way the module is structured when I the count query will come back with duplicate ids and so produces an incorrect count sometimes. the way I've overcome this is to count DISTINCT item ids. i know this is a mysql command and it will probably work with some other databases but am not sure if it will work in all databases that Gallery wants to support. Can you let me know if it is OK to use DISTINCT and if not are there any other methods i can use to do this? i've grepped for DISTINCT (lowercase too) in the modules but didn't find any instancs of it, so assume that it won't be compatible with other databases.
Posts: 13
DISTINCT is a standard SQL keyword. I know it works in Oracle, SQL Server, MySQL and PostGRE, and it should work in most others as well.
Posts: 10
coo, thanks!