[not a crosspost, in fact, a re-send]
(egroupware (1.8.004.20130322) hardy from suse packages)
Hi,
I am trying to do a query over XMLRPC like this:
(according to http://wiki.egroupware.org/index.php?wikipage=AddressbookXmlRpc)
<?xml version="1.0"?>
addressbook.boaddressbook.search
start
0
limit
5
fields
[side note : is this how an 'unset' array is made? i.e. with no 'data' ?]
query
079
filter
none // <<< if I change this to all...
order
fn
sort
ASC
include_users
all
I am getting this in return :
(my comments inline, marked // )
Database error
Database error
db::column_data_implode(' AND ',Array
(
// so this is the only place where I see 'none' in the output and it sort of matches the 'none' of
// predefined filter field...
[none] => // <<<< if i change the 'all' in above inovcation, 'all' appears here. <<<<
// if i just pass empty value (empty string) I get Invalid SQL like the next output,
// if i just pass an anonymous empty I also get Invalid SQL...
[0] => contact_tid != 'D'
[1] => (egw_addressbook.contact_owner=6 OR contact_private=0 AND egw_addressbook.contact_owner IN (-39,-21,-1,6,0) OR egw_addressbook.contact_owner IS NULL)
[2] => (account_expires IS NULL OR account_expires = -1 OR account_expires > 1379580785)
[3] => ((((( CONCAT(CAST(COALESCE(n_family,'') AS char),CAST(COALESCE(n_given,'') AS char),CAST(COALESCE(n_middle,'') AS char),CAST(COALESCE(n_prefix,'') AS char),CAST(COALESCE(n_suffix,'') AS char),CAST(COALESCE(n_fn,'') AS char),CAST(COALESCE(n_fileas,'') AS char),CAST(COALESCE(contact_bday,'') AS char),CAST(COALESCE(org_name,'') AS char),CAST(COALESCE(org_unit,'') AS char),CAST(COALESCE(contact_title,'') AS char),CAST(COALESCE(contact_role,'') AS char),CAST(COALESCE(contact_assistent,'') AS char),CAST(COALESCE(contact_room,'') AS char),CAST(COALESCE(adr_one_street,'') AS char),CAST(COALESCE(adr_one_street2,'') AS char),CAST(COALESCE(adr_one_locality,'') AS char),CAST(COALESCE(adr_one_region,'') AS char),CAST(COALESCE(adr_one_postalcode,'') AS char),CAST(COALESCE(adr_one_countryna
me,’’) AS char),CAST(COALESCE(contact_label,’’) AS char),CAST(COALESCE(adr_two_street,’’) AS char),CAST(COALESCE(adr_two_street2,’’) AS char),CAST(COALESCE(adr_two_locality,’’) AS char),CAST(COALESCE
(adr_two_region,’’) AS char),CAST(COALESCE(adr_two_postalcode,’’) AS char),CAST(COALESCE(adr_two_countryname,’’) AS char),CAST(COALESCE(tel_work,’’) AS char),CAST(COALESCE(tel_cell,’’) AS char),CAST(COALESCE(tel_fax,’’) AS char),CAST(COALESCE(tel_assistent,’’) AS char),CAST(COALESCE(tel_car,’’) AS char),CAST(COALESCE(tel_pager,’’) AS char),CAST(COALESCE(tel_home,’’) AS char),CAST(COALESCE(tel_fax_home,’’) AS char),CAST(COALESCE(tel_cell_private,’’) AS char),CAST(COALESCE(tel_other,’’) AS char),CAST(COALESCE(tel_prefer,’’) AS char),CAST(COALESCE(contact_email,’’) AS char),CAST(COALESCE(contact_email_home,’’) AS char),CAST(COALESCE(contact_url,’’) AS char),CAST(COALESCE(contact_url_home,’’) AS char),CAST(COALESCE(contact_freebusy_uri,’’) AS char),CAST(COALESCE(contact_calendar_uri,’’) AS cha
r),CAST(COALESCE(contact_note,’’) AS char),CAST(COALESCE(contact_geo,’’) AS char),CAST(COALESCE(contact_pubkey,’’) AS char),CAST(COALESCE(adr_one_countrycode,’’) AS char),CAST(COALESCE(adr_two_countr
ycode,’’) AS char),CAST(COALESCE(carddav_name,’’) AS char),CAST(COALESCE(egw_addressbook_extra.contact_value,’’) AS char)) LIKE ‘%079%’ OR (egw_addressbook.contact_id IS NOT NULL AND egw_addressbook.contact_id = 079))) )))
)
,‘1’,<pre>Array
(
[contact_id] => Array
(
[type] => auto
[nullable] =>
)
[contact_tid] => Array
(
[type] => char
[precision] => 1
[default] => n
)
[contact_owner] => Array
(
[type] => int
[precision] => 8
[nullable] =>
)
[contact_private] => Array
(
[type] => int
[precision] => 1
[default] => 0
)
[cat_id] => Array
(
[type] => varchar
[precision] => 255
)
[n_family] => Array
(
[type] => varchar
[precision] => 64
)
[n_given] => Array
(
[type] => varchar
[precision] => 64
)
[n_middle] => Array
(
[type] => varchar
[precision] => 64
)
[n_prefix] => Array
(
[type] => varchar
[precision] => 64
)
[n_suffix] => Array
(
[type] => varchar
[precision] => 64
)
[n_fn] => Array
(
[type] => varchar
[precision] => 128
)
[n_fileas] => Array
(
[type] => varchar
[precision] => 255
)
[contact_bday] => Array
(
[type] => varchar
[precision] => 12
)
[org_name] => Array
(
[type] => varchar
[precision] => 128
)
[org_unit] => Array
(
[type] => varchar
[precision] => 64
)
[contact_title] => Array
(
[type] => varchar
[precision] => 64
)
[contact_role] => Array
(
[type] => varchar
[precision] => 64
)
[contact_assistent] => Array
(
[type] => varchar
[precision] => 64
)
[contact_room] => Array
(
[type] => varchar
[precision] => 64
)
[adr_one_street] => Array
(
[type] => varchar
[precision] => 64
)
[adr_one_street2] => Array
(
[type] => varchar
[precision] => 64
)
[adr_one_locality] => Array
(
[type] => varchar
[precision] => 64
)
[adr_one_region] => Array
(
[type] => varchar
[precision] => 64
)
[adr_one_postalcode] => Array
(
[type] => varchar
[precision] => 64
)
[adr_one_countryname] => Array
(
[type] => varchar
[precision] => 64
)
[contact_label] => Array
(
[type] => text
)
[adr_two_street] => Array
(
[type] => varchar
[precision] => 64
)
[adr_two_street2] => Array
(
[type] => varchar
[precision] => 64
)
[adr_two_locality] => Array
(
[type] => varchar
[precision] => 64
)
[adr_two_region] => Array
(
[type] => varchar
[precision] => 64
)
[adr_two_postalcode] => Array
(
[type] => varchar
[precision] => 64
)
[adr_two_countryname] => Array
(
[type] => varchar
[precision] => 64
)
[tel_work] => Array
(
[type] => varchar
[precision] => 40
)
[tel_cell] => Array
(
[type] => varchar
[precision] => 40
)
[tel_fax] => Array
(
[type] => varchar
[precision] => 40
)
[tel_assistent] => Array
(
[type] => varchar
[precision] => 40
)
[tel_car] => Array
(
[type] => varchar
[precision] => 40
)
[tel_pager] => Array
(
[type] => varchar
[precision] => 40
)
[tel_home] => Array
(
[type] => varchar
[precision] => 40
)
[tel_fax_home] => Array
(
[type] => varchar
[precision] => 40
)
[tel_cell_private] => Array
(
[type] => varchar
[precision] => 40
)
[tel_other] => Array
(
[type] => varchar
[precision] => 40
)
[tel_prefer] => Array
(
[type] => varchar
[precision] => 32
)
[contact_email] => Array
(
[type] => varchar
[precision] => 128
)
[contact_email_home] => Array
(
[type] => varchar
[precision] => 128
)
[contact_url] => Array
(
[type] => varchar
[precision] => 128
)
[contact_url_home] => Array
(
[type] => varchar
[precision] => 128
)
[contact_freebusy_uri] => Array
(
[type] => varchar
[precision] => 128
)
[contact_calendar_uri] => Array
(
[type] => varchar
[precision] => 128
)
[contact_note] => Array
(
[type] => text
)
[contact_tz] => Array
(
[type] => varchar
[precision] => 8
)
[contact_geo] => Array
(
[type] => varchar
[precision] => 32
)
[contact_pubkey] => Array
(
[type] => text
)
[contact_created] => Array
(
[type] => int
[precision] => 8
)
[contact_creator] => Array
(
[type] => int
[precision] => 4
[nullable] =>
)
[contact_modified] => Array
(
[type] => int
[precision] => 8
[nullable] =>
)
[contact_modifier] => Array
(
[type] => int
[precision] => 4
)
[contact_jpegphoto] => Array
(
[type] => blob
)
[account_id] => Array
(
[type] => int
[precision] => 4
)
[contact_etag] => Array
(
[type] => int
[precision] => 4
[default] => 0
)
[contact_uid] => Array
(
[type] => varchar
[precision] => 255
)
[adr_one_countrycode] => Array
(
[type] => varchar
[precision] => 2
)
[adr_two_countrycode] => Array
(
[type] => varchar
[precision] => 2
)
[carddav_name] => Array
(
[type] => varchar
[precision] => 64
[comment] => name part of CardDAV URL, if specified by client
)
)
</pre><b>nothing known about column ‘none’!</b>
Click here to resume your eGroupWare Session.
Seems like the only place above where ‘none’ is used is in the ‘filter’ member of the query, but if
I remove the whole ‘filter’ member, I get ‘Invalid SQL’, like below, so…
Database error
Database error
Invalid SQL: SELECT SQL_CALC_FOUND_ROWS FROM egw_addressbook LEFT JOIN egw_accounts ON egw_addressbook.account_id=egw_accounts.account_id LEFT JOIN egw_addressbook_extra ON egw_addressbook.contact_id=egw_addressbook_extra.contact_id WHERE contact_tid != 'D' AND (egw_addressbook.contact_owner=6 OR contact_private=0 AND egw_addressbook.contact_owner IN (-39,-21,-1,6,0) OR egw_addressbook.contact_owner IS NULL) AND (account_expires IS NULL OR account_expires = -1 OR account_expires > 1379581363) AND ((((( CONCAT(CAST(COALESCE(n_family,'') AS char),CAST(COALESCE(n_given,'') AS char),CAST(COALESCE(n_middle,'') AS char),CAST(COALESCE(n_prefix,'') AS char),CAST(COALESCE(n_suffix,'') AS char),CAST(COALESCE(n_fn,'') AS char),CAST(COALESCE(n_fileas,'') AS char),CAST(COALESCE(contact_bd
ay,'') AS char),CAST(COALESCE(org_name,'') AS char),CAST(COALESCE(org_unit,'') AS char),CAST(COALESCE(contact_title,'') AS char),CAST(COALESCE(contact_role,'') AS char),CAST(COALESCE(contact_assisten
t,'') AS char),CAST(COALESCE(contact_room,'') AS char),CAST(COALESCE(adr_one_street,'') AS char),CAST(COALESCE(adr_one_street2,'') AS char),CAST(COALESCE(adr_one_locality,'') AS char),CAST(COALESCE(adr_one_region,'') AS char),CAST(COALESCE(adr_one_postalcode,'') AS char),CAST(COALESCE(adr_one_countryname,'') AS char),CAST(COALESCE(contact_label,'') AS char),CAST(COALESCE(adr_two_street,'') AS char),CAST(COALESCE(adr_two_street2,'') AS char),CAST(COALESCE(adr_two_locality,'') AS char),CAST(COALESCE(adr_two_region,'') AS char),CAST(COALESCE(adr_two_postalcode,'') AS char),CAST(COALESCE(adr_two_countryname,'') AS char),CAST(COALESCE(tel_work,'') AS char),CAST(COALESCE(tel_cell,'') AS char),CAST(COALESCE(tel_fax,'') AS char),CAST(COALESCE(tel_assistent,'') AS char),CAST(COALESCE(tel_car,'') AS
char),CAST(COALESCE(tel_pager,'') AS char),CAST(COALESCE(tel_home,'') AS char),CAST(COALESCE(tel_fax_home,'') AS char),CAST(COALESCE(tel_cell_private,'') AS char),CAST(COALESCE(tel_other,'') AS char
),CAST(COALESCE(tel_prefer,'') AS char),CAST(COALESCE(contact_email,'') AS char),CAST(COALESCE(contact_email_home,'') AS char),CAST(COALESCE(contact_url,'') AS char),CAST(COALESCE(contact_url_home,'') AS char),CAST(COALESCE(contact_freebusy_uri,'') AS char),CAST(COALESCE(contact_calendar_uri,'') AS char),CAST(COALESCE(contact_note,'') AS char),CAST(COALESCE(contact_geo,'') AS char),CAST(COALESCE(contact_pubkey,'') AS char),CAST(COALESCE(adr_one_countrycode,'') AS char),CAST(COALESCE(adr_two_countrycode,'') AS char),CAST(COALESCE(carddav_name,'') AS char),CAST(COALESCE(egw_addressbook_extra.contact_value,'') AS char)) LIKE '%079%' OR (egw_addressbook.contact_id IS NOT NULL AND egw_addressbook.contact_id = 079))) ))) ORDER BY contact_fn ASC:
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 'FROM egw_addressbook LEFT JOIN egw_accounts ON egw_addressbook.account_id=egw_a' at line 1
Click here to resume your eGroupWare Session.
… so my conclusion is :
- the invocation with ‘filter’ member must pass a name of a pre-defined filter
- where is this filter defined ?
- is there a way to get a list of filters we’re supposed to use here?
- or a way to define the filter ?
Hope it’s not hopeless
Lukasz
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers