[turba] sql data from 2 different tables

Terry td3201 at gmail.com
Tue Nov 8 09:53:06 PST 2005


Ok, I think I know the direction I need to head now.  Only getting errors:

Nov 08 11:49:06 HORDE [debug] [turba] SQL query by
Turba_Driver_sql::_search(): SELECT id, name, firstname FROM mos_users
LEFT JOIN mos_comprofiler ON mos_users.id=mos_comprofiler.id WHERE
(LOWER(name) LIKE LOWER(?)) [on line 80 of
"/home/apache/www.asdfasdf.org/horde/turba/lib/Driver/sql.php"]
Nov 08 11:49:06 HORDE [error] [turba] DB Error: unknown error: SELECT
id, name, firstname FROM mos_users LEFT JOIN mos_comprofiler ON
mos_users.id=mos_comprofiler.id WHERE (LOWER(name) LIKE LOWER('%%'))
[nativecode=1052 ** Column 'id' in field list is ambiguous] [on line
85 of "/home/apache/www.asdfasdf.org/horde/turba/lib/Driver/sql.php"]


Here is my table name:
'table' => 'mos_users LEFT JOIN mos_comprofiler ON
mos_users.id=mos_comprofiler.id',

mos_users.id == int(11)
mos_comprofiler.id == int(11)

On 11/7/05, Jan Schneider <jan at horde.org> wrote:
> Zitat von Terry <td3201 at gmail.com>:
>
> > Could I get an example of a join statement for this?
>
> No, because only you know how these tables are correctly joined.
>
> > On 11/4/05, Adam Tauno Williams <adam at morrison-ind.com> wrote:
> >> > > I want to have a single source but the data I need is in 2 separate
> >> > > tables.  How can I make this work?
> >> > Enter a JOIN statement as the table name.
>
> Jan.
>
> --
> Do you need professional PHP or Horde consulting?
> http://horde.org/consulting/
>
> --
> Turba mailing list - Join the hunt: http://horde.org/bounties/#turba
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: turba-unsubscribe at lists.horde.org
>


More information about the turba mailing list