[dev] Re: [cvs] commit: framework/DataTree/DataTree sql.php

Ben Chavet ben at horde.org
Wed Mar 16 08:10:18 PST 2005


>  Log:
>  Use bindings for the *ByAttributes() methods.
>
>  Revision  Changes    Path
>  1.165     +88 -52    framework/DataTree/DataTree/sql.php

This broke my datatree on two different machines.  One using 
postgres-7.4.6-1.FC2.2, the other with postgres 7.4.7.

--Ben

from horde's log:

[trean] DB Error: mismatch: SELECT c.datatree_id, c.datatree_name FROM 
horde_datatree c LEFT JOIN horde_datatree_attributes a1 ON 
a1.datatree_id = c.datatree_id LEFT JOIN horde_datatree_attributes a2 
ON a2.datatree_id = c.datatree_id WHERE c.group_uid = AND 
(((a1.attribute_name = AND a1.attribute_value = ) OR (a1.attribute_name 
= AND a1.attribute_key = AND CASE WHEN CAST(a1.attribute_value AS 
VARCHAR) ~ '^-?[0-9]+$' THEN (CAST(a1.attribute_value AS INTEGER) & 0) 
<> 0 ELSE FALSE END) OR (a1.attribute_name = AND CASE WHEN 
CAST(a1.attribute_value AS VARCHAR) ~ '^-?[0-9]+$' THEN 
(CAST(a1.attribute_value AS INTEGER) & 0) <> 0 ELSE FALSE END) OR 
(a1.attribute_name = AND CASE WHEN CAST(a1.attribute_value AS VARCHAR) 
~ '^-?[0-9]+$' THEN (CAST(a1.attribute_value AS INTEGER) & 0) <> 0 ELSE 
FALSE END)) AND a2.attribute_name = AND a2.attribute_value = ) AND 
a1.attribute_name = a2.attribute_name GROUP BY c.datatree_id, 
c.datatree_name, c.datatree_order ORDER BY c.datatree_order, 
c.datatree_name, c.datatree_id [DB Error: mismatch] [on line 1101 of 
"/home/ben/pear/Horde/DataTree/sql.php"]

When I run it directly on the database:

ERROR:  syntax error at or near "AND" at character 227



More information about the dev mailing list