[#6669] MySQL syntax error in Group SQL driver
Summary MySQL syntax error in Group SQL driver
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners Michael Rubinsky <mrubinsk (at) horde (dot) org>
Requester vilius (at) lnk (dot) lt
Created 05/01/2008 (99 days ago)
Due
Updated 05/01/2008 (99 days ago)
Assigned
Resolved 05/01/2008 (99 days ago)
Attachments sql.php.patch Download
Milestone
Patch No

History
05/01/2008 Michael Rubinsky Comment #7 Reply to this comment
oops. Forgot to take that out.

Thanks!
05/01/2008 vilius (at) lnk (dot) lt Comment #6 Reply to this comment
Correct me if I'm wrong, but AFAIK binding automatically takes care of 
value quoting, so there is no need for $parents[] = 
$this->_db->quote($name);
05/01/2008 Michael Rubinsky Assigned to Michael Rubinsky
 
05/01/2008 Michael Rubinsky Comment #5
State ⇒ Resolved
Reply to this comment
Fixed using bind parameters, and merged.

Thanks for the testing!
05/01/2008 Chuck Hagenbuch Comment #4 Reply to this comment
Nope, no reason
05/01/2008 Michael Rubinsky Comment #3 Reply to this comment
Is there any reason not to use bind parameters here?
05/01/2008 vilius (at) lnk (dot) lt Comment #2
New Attachment: sql.php.patch Download
Reply to this comment
Possible patch.
05/01/2008 vilius (at) lnk (dot) lt Comment #1
Patch ⇒
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ MySQL syntax error in Group SQL driver
Type ⇒ Bug
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Reply to this comment
This commit 
http://cvs.horde.org/diff.php?r1=1.1&r2=1.2&f=framework%2FGroup%2FGroup%2Fsql.php brakes in cases where there is only one parent group. This group will be double singlequoted, 
e.g.:

DB Error: syntax error: SELECT group_uid, group_name FROM horde_groups 
  WHERE group_name IN (''Technikai'')