Problem is, after prepending the table-name in order by, it also needs
to be prepended to the colum list. Try:
SELECT DISTINCT egw_addressbook.*,extra_order.contact_value<>’’
---------------------------------------^
I commited a fix to Trunk:
http://dev.egroupware.org/viewvc/egroupware?view=rev&revision=30023
Ralf
Hello from the address book and add a custom field called ‘CAMPUS’, then I
went to the address book and the column appeared to me as ‘CAMPUS’, to click
on this I get this message from the database and I no longer can see the
address book but I could help.
Database error
Invalid SQL: SELECT DISTINCT egw_addressbook.*,contact_value<>’’ FROM
egw_addressbook LEFT JOIN egw_addressbook_extra extra_order ON
egw_addressbook.contact_id=extra_order.contact_id AND
extra_order.contact_name=‘CAMPUS’ WHERE contact_tid=‘n’ AND
(egw_addressbook.contact_owner=11 OR contact_private=0 AND
egw_addressbook.contact_owner IN (-1,11,0) OR egw_addressbook.contact_owner
IS NULL) ORDER BY extra_order.contact_value<>’'
DESC,extra_order.contact_value ASC,org_name ASC,n_family ASC,n_given ASC:
ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in the list of
results
–
Ralf Becker
Director Software Development
Stylite GmbH
[open style of IT]
Morschheimer Strasse 15
67292 Kirchheimbolanden
fon +49 (0) 6352 70629-0
fax +49 (0) 6352 70629-30
mailto: rb@stylite.de
www.stylite.de
www.egroupware.org
Geschäftsführer Andre Keller,
Gudrun Müller, Ralf Becker
Registergericht Kaiserslautern HRB 30575
Umsatzsteuer-Id / VAT-Id: DE214280951
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers