[#7075] DB: Error no such field -- adding members to a group
Summary DB: Error no such field -- adding members to a group
Queue Horde Groupware
Queue Version 1.1.1
Type Bug
State Resolved
Priority 1. Low
Owners Chuck Hagenbuch <chuck (at) horde (dot) org>
Requester kkruger (at) tecs-company (dot) com
Created 07/16/2008 (127 days ago)
Due
Updated 07/17/2008 (126 days ago)
Assigned
Resolved 07/17/2008 (126 days ago)
Attachments
Milestone
Patch No

History
07/17/2008 Chuck Hagenbuch Comment #5 Reply to this comment
Double quotes are not valid as a data quoting method in most databases.
07/17/2008 kkruger (at) tecs-company (dot) com Comment #4 Reply to this comment
true,

must be a PEAR issue, not postgresql database,...  I usually do the 
same syntax as in the original file.

hmmm, is there a qualified solution in PEAR?

Klaus Kruger
TECS Company Inc
15 Eury Lane
Somerset KY 42501

606-451-3005
07/17/2008 Chuck Hagenbuch Comment #3
State ⇒ Resolved
Assigned to Chuck Hagenbuch
Reply to this comment
Not quite the right fix, but on the right track. This has been fixed 
in CVS and for 3.2.2 - thanks!
07/17/2008 CVS Commit Comment #2 Reply to this comment
07/16/2008 kkruger (at) tecs-company (dot) com Comment #1
Patch ⇒
Milestone ⇒
Queue ⇒ Horde Groupware
Summary ⇒ DB: Error no such field -- adding members to a group
Type ⇒ Bug
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Reply to this comment
hello,

I have been trying to track down why I was getting 'DB: Error no such 
field' when trying to add members to a group in horde-groupware-1.1.1.

I'm still very new to horde and am still trying to learn my way 
around, but there is no mention of this error in /tmp/horde.log.  I 
was however able to get postgresql to log this error:

In horde/lib/Horde/Group/sql.php, I made the following change, and 
members were successfully added to the group.

     880         if (!empty($this->data['users'])) {
     881             $query = 'INSERT INTO horde_groups_members 
(group_uid, user_uid)'
     882                 .' VALUES (' . $this->id . ', ?)';
     882 // original line       .' VALUES ("' . $this->id . '", ?)';
     883             $sth = $this->_groupOb->_write_db->prepare($query);
     884             $result = 
$this->_groupOb->_write_db->executeMultiple($sth, 
array_keys($this->data['users']));
     885             if (is_a($result, 'PEAR_Error')) {
     886                 return $result;
     887             }
     888         }

The database is postgresql 8.1.11-1.el5_1.1 if that means anything.

I would appreciate if this find can be confirmed,... or maybe I have 
something set up wrong to cause this behaviour.  The reason I say that 
is that during the horde setup I used the default encoding of 
ISO_8859_1.  In postgresql I also left the default of UTF8.

I wonder if this may be part of it.

Klaus