From: Lukasz S. <el....@gm...> - 2013-09-19 09:43:08
|
(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"?> <methodCall> <methodName>addressbook.boaddressbook.search</methodName> <params> <param> <value> <struct> <member> <name>start</name> <value><int>0</int></value> </member> <member> <name>limit</name> <value><int>5</int></value> </member> <member> <name>fields</name> <value> <array></array> [side note : is this how an 'unset' array is made? i.e. with no 'data' ?] </value> </member> <member> <name>query</name> <value><string>079</string></value> </member> <member> <name>filter</name> <value><string>none</string></value> </member> <member> <name>order</name> <value><string>fn</string></value> </member> <member> <name>sort</name> <value><string>ASC</string></value> </member> <member> <name>include_users</name> <value><string>all</string></value> </member> </struct> </value> </param> </params> </methodCall> I am getting this in return : <html> <head> <title>Database error</title> </head> <body> <h3>Database error</h3> <pre><b>db::column_data_implode(' AND ',Array ( [none] => [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_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_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></b> </pre> <p><a href="/egroupware/index.php">Click here to resume your eGroupWare Session.</a></p> </body> </html> 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 <html> <head> <title>Database error</title> </head> <body> <h3>Database error</h3> <pre><b>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_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_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</b> </pre> <p><a href="/egroupware/index.php">Click here to resume your eGroupWare Session.</a></p> </body> </html> |