[Tickets #1918] NEW: DB Error: syntax error
bugs@bugs.horde.org
bugs at bugs.horde.org
Thu May 5 09:14:28 PDT 2005
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=1918
-----------------------------------------------------------------------
Ticket | 1918
Created By | liamr at umich.edu
Summary | DB Error: syntax error
Queue | Turba
Version | 2.0.2
State | Unconfirmed
Priority | 1. Low
Type | Bug
Owners |
-----------------------------------------------------------------------
liamr at umich.edu (2005-05-05 09:14) wrote:
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 at example.com" )
More information about the bugs
mailing list