6.0.0-beta1
7/22/25

[#1918] DB Error: syntax error
Summary DB Error: syntax error
Queue Turba
Queue Version 2.0.2
Type Bug
State Resolved
Priority 1. Low
Owners
Requester liamr (at) umich (dot) edu
Created 05/05/2005 (7383 days ago)
Due
Updated 05/07/2005 (7381 days ago)
Assigned 05/06/2005 (7382 days ago)
Resolved 05/07/2005 (7381 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/07/2005 03:57:50 AM Chuck Hagenbuch Comment #4
State ⇒ Resolved
Reply to this comment
I can't reproduce this with the latest HEAD or FRAMEWORK_3 code. And 
the bit you put at the end needs to be in a seperate ticket since it 
has nothing to do with the SQL error.
05/06/2005 03:09:39 PM liamr (at) umich (dot) edu Comment #3 Reply to this comment
I tried copying SQL.php and the SQL subdirectory, and I get the same error...



May 06 11:07:50 HORDE [error] [turba] DB Error: syntax error: SELECT 
object_id, owner_id, object_type, object_members, object_uid, 
object_name, object_email, object_alias, object_homeaddress, 
object_workaddress, object_homephone, object_workphone, 
object_cellphone, object_fax, object_title, object_company, 
object_notes, object_pgppublickey, object_smimepublickey, 
object_freebusyurl FROM turba_objects WHERE (object_alias = 'sara' 0 
owner_id = 'liamr' AND (object_name LIKE LOWER('%sara%'))) 
[nativecode=1064 ** You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right 
syntax to use near '0 owner_id = 'liamr' AND (object_name LIKE 
LOWER('%sara%')))' at line 1] [on line 82 of 
"/usr/local/projects/webmail/html-dev/horde/turba/lib/Driver/sql.php"]


05/06/2005 09:15:06 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
This sounds like a bug in framework/SQL/SQL.php that already has been 
fixed. Can you try the latest version from CVS of this file?
05/05/2005 04:14:28 PM liamr (at) umich (dot) edu Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ DB Error: syntax error
Queue ⇒ Turba
Reply to this comment
I'm using mysql as a backend.  Here's an excerpt from sources.php



     'search' => array(

         'name',

         'email',

         'alias'

     ),

     'strict' => array(

         'object_id',

         'owner_id',

         'object_type',

         'object_alias'

     ),



I want people to be able to search by name, email or alias, but I want 
the alias to be a strict search (allowing people to have entries like 
"dad" and "stepdad" in their addressbook and have it find the right 
one).   So, after I added "object_alias" to strict search, I get...



May 05 12:07:14 HORDE [error] [turba] DB Error: syntax error: SELECT 
object_id, owner_id, object_type, object_members, object_uid, 
object_name, object_email, object_alias, object_homeaddress, 
object_workaddress, object_homephone, object_workphone, 
object_cellphone, object_fax, object_title, object_company, 
object_notes, object_pgppublickey, object_smimepublickey, 
object_freebusyurl FROM turba_objects WHERE (object_alias = 'dad' 0 
owner_id = 'liamr' AND (object_name LIKE LOWER('%dad%'))) 
[nativecode=1064 ** You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right 
syntax to use near '0 owner_id = 'liamr' AND (object_name LIKE 
LOWER('%dad%')))' at line 1] [on line 82 of 
"/usr/local/projects/webmail/html-dev/horde/turba/lib/Driver/sql.php"]



This is probably equally bug / feature request.. but basically, I'd 
like to replicate PINE's addressbook behavior such that  if you type 
in an unqualified address (eg "dad" ) it follows logic like this..

- look for entries where the nickname matches "dad" exactly

- look for entries where the full name contains "dad"

- add the default domain to the word and call it done ( "dad@example.com" )

Saved Queries