6.0.0-RC7
6/21/26

[#2419] Local SQL doesn't work (with fix)
Summary Local SQL doesn't work (with fix)
Queue Turba
Queue Version HEAD
Type Bug
State Resolved
Priority 3. High
Owners selsky (at) columbia (dot) edu
Requester erland (at) lewin (dot) nu
Created 8/10/05 (7620 days ago)
Due
Updated 9/6/17 (3210 days ago)
Assigned 8/11/05 (7619 days ago)
Resolved 8/11/05 (7619 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
118 Git Commit Comment #8 Reply to this comment
Changes have been made in Git (master):

commit b624e669f35c1c5e03edbc806389f7a22f867153
Author: Paul M Jones <pmjones@ciaweb.net>
Date:   Thu Sep 30 13:40:24 2004 +0000

     Wiki.php: fixed bug 2419 for getParseConf(), fixed similar bug in 
getFormatConf()
     package.xml: updated with new version and release date


     git-svn-id: 
https://svn.php.net/repository/pear/packages/Text_Wiki/trunk@169638 
c90b9560-bf6c-de11-be94-00142212c4b1

  Text/Wiki.php | 6 +++---
  package.xml   | 8 +++++---
  2 files changed, 8 insertions(+), 6 deletions(-)

http://github.com/horde/horde/commit/b624e669f35c1c5e03edbc806389f7a22f867153
496 Matt Selsky State ⇒ Resolved
 
566 Matt Selsky Comment #7 Reply to this comment
This has been fixed in Turba 2.0.4 and Kronolith 2.0.4.
515 Jan Schneider Comment #6 Reply to this comment
I guess you could check if the function result is an array or a 
string? If not, revert.

And make sure to check if you need to fix other places too.
495 Matt Selsky Comment #5 Reply to this comment
OK.  Do I need to revert, or can I do a version check and use bind 
variables with Horde >= 3.0.4?
98 Jan Schneider Comment #4
State ⇒ Assigned
Reply to this comment
Do I have to upgrade Horde from 3.0.2 to 3.0.5 to use Turba H3 2.0.3?
I don't think that was mentioned in the documentation anywhere. I
didn't expect API changes in a minor version number upgrade.
No, and it shouldn't be necessary.



Note to Matt: it shouldn't even be necessary if using Turba from CVS. 
You can't rely on something you introduced in Horde or framework HEAD.
527 erland (at) lewin (dot) nu Comment #3 Reply to this comment
I didn't upgrade from CVS; I installed both Horde and Turba from the 
stable distributions. The reference to CVS in my comment was just 
because I checked CVS before posting the fix.



Do I have to upgrade Horde from 3.0.2 to 3.0.5 to use Turba H3 2.0.3? 
I don't think that was mentioned in the documentation anywhere. I 
didn't expect API changes in a minor version number upgrade.



The CVS header of the Horde SQL.php is:



$Horde: framework/SQL/SQL.php,v 1.30.2.1 2005/01/03 12:19:12 jan Exp $



and in Turba:



$Horde: turba/lib/Driver/sql.php,v 1.59.10.9 2005/06/10 04:29:14 selsky Exp \

$



Thanks for the help.


4210 Matt Selsky Comment #2
State ⇒ Feedback
Reply to this comment
What are the $Horde version numbers of framework/SQL/SQL.php and 
turba/lib/Driver/sql.php?  Are you sure you installed the latest 
framework when you upgraded from CVS?
41 Jan Schneider Assigned to Matt Selsky
State ⇒ Assigned
 
129 erland (at) lewin (dot) nu Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Local SQL doesn't work (with fix)
Queue ⇒ Turba
State ⇒ Unconfirmed
Reply to this comment
I just installed Turba h3-2.0.3 on Horde 3.0.2, configured to use my 
local MySQL database.



I added a contact without problems, but the lists didn't show the 
contact, just empty entries called 'D' and another single letter name.



I tracked it down the file turba/lib/Driver/sql.php and the section 
around line 310:



                     $binds = Horde_SQL::buildClause($this->_db, 
$vals['field'],\

  $vals['op'], $rhs, true);

                     $clause .= $binds[0];

                     $values = array_merge($values, $binds[1]);



Horde_SQL::buildClause returns a string, not an array. Changing the 
clause line above to:



$clause .= $binds



and removing the "$values=..." line fixes the problem.



The bug was apparently introduced in CVS version 1.72 of the file on June 9.



Cheers!


Saved Queries