[not-a-crosspost] XMLRPC vs addressbook search results in database error

classic Classic list List threaded Threaded
7 messages Options
el_es el_es
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[not-a-crosspost] XMLRPC vs addressbook search results in database error

[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"?>
<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> // <<< if I change this to all...
                                        </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 :

(my comments inline, marked // )

<html>
<head>
<title>Database error</title>
</head>
<body>
<h3>Database error</h3>
<pre><b>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] =&gt; // <<<< 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 <value></value> I also get Invalid SQL...

    [0] =&gt; contact_tid != 'D'
    [1] =&gt; (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] =&gt; (account_expires IS NULL OR account_expires = -1 OR account_expires &gt; 1379580785)
    [3] =&gt; ((((( 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',,&lt;pre&gt;Array
(
    [contact_id] =&gt; Array
        (
            [type] =&gt; auto
            [nullable] =&gt;
        )

    [contact_tid] =&gt; Array
        (
            [type] =&gt; char
            [precision] =&gt; 1
            [default] =&gt; n
        )

    [contact_owner] =&gt; Array
        (
            [type] =&gt; int
            [precision] =&gt; 8
            [nullable] =&gt;
        )

    [contact_private] =&gt; Array
        (
            [type] =&gt; int
            [precision] =&gt; 1
            [default] =&gt; 0
        )

    [cat_id] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 255
        )

    [n_family] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [n_given] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [n_middle] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [n_prefix] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [n_suffix] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [n_fn] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 128
        )

    [n_fileas] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 255
        )

    [contact_bday] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 12
        )

    [org_name] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 128
        )

    [org_unit] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [contact_title] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [contact_role] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [contact_assistent] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [contact_room] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [adr_one_street] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [adr_one_street2] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [adr_one_locality] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [adr_one_region] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [adr_one_postalcode] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [adr_one_countryname] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [contact_label] =&gt; Array
        (
            [type] =&gt; text
        )

    [adr_two_street] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [adr_two_street2] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [adr_two_locality] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [adr_two_region] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [adr_two_postalcode] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [adr_two_countryname] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
        )

    [tel_work] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 40
        )

    [tel_cell] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 40
        )

    [tel_fax] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 40
        )

    [tel_assistent] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 40
        )

    [tel_car] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 40
        )

    [tel_pager] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 40
        )

    [tel_home] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 40
        )

    [tel_fax_home] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 40
        )

    [tel_cell_private] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 40
        )

    [tel_other] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 40
        )

    [tel_prefer] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 32
        )

    [contact_email] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 128
        )

    [contact_email_home] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 128
        )

    [contact_url] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 128
        )

    [contact_url_home] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 128
        )

    [contact_freebusy_uri] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 128
        )

    [contact_calendar_uri] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 128
        )

    [contact_note] =&gt; Array
        (
            [type] =&gt; text
        )

    [contact_tz] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 8
        )

    [contact_geo] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 32
        )

    [contact_pubkey] =&gt; Array
        (
            [type] =&gt; text
        )

    [contact_created] =&gt; Array
        (
            [type] =&gt; int
            [precision] =&gt; 8
        )

    [contact_creator] =&gt; Array
        (
            [type] =&gt; int
            [precision] =&gt; 4
            [nullable] =&gt;
        )

    [contact_modified] =&gt; Array
        (
            [type] =&gt; int
            [precision] =&gt; 8
            [nullable] =&gt;
        )

    [contact_modifier] =&gt; Array
        (
            [type] =&gt; int
            [precision] =&gt; 4
        )

    [contact_jpegphoto] =&gt; Array
        (
            [type] =&gt; blob
        )

    [account_id] =&gt; Array
        (
            [type] =&gt; int
            [precision] =&gt; 4
        )

    [contact_etag] =&gt; Array
        (
            [type] =&gt; int
            [precision] =&gt; 4
            [default] =&gt; 0
        )

    [contact_uid] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 255
        )

    [adr_one_countrycode] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 2
        )

    [adr_two_countrycode] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 2
        )

    [carddav_name] =&gt; Array
        (
            [type] =&gt; varchar
            [precision] =&gt; 64
            [comment] =&gt; name part of CardDAV URL, if specified by client
        )

)
&lt;/pre&gt;&lt;b&gt;nothing known about column 'none'!&lt;/b&gt;</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 'Invalid SQL', like below, so...

<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 &gt; 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</b>

</pre>
<p><a href="/egroupware/index.php">Click here to resume your eGroupWare Session.</a></p>
</body>
</html>


... 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
Nathan Gray Nathan Gray
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [not-a-crosspost] XMLRPC vs addressbook search results in database error




On Thu, Sep 19, 2013 at 7:46 AM, Lukasz Sokol <[hidden email]> wrote:
...
&lt;/pre&gt;&lt;b&gt;nothing known about column 'none'!&lt;/b&gt;</b>

This is an empty array (array()), not null:
<member>
 <name>fields</name>
 <value>
   <array></array>
 </value>
</member>
I don't know what will be accepted as null.  Have you tried leaving out the fields member entirely?  Maybe lose the <array /> tag?
 
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...

...

... 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 ?

 
This code doesn't have the concept of pre-defined filters.

From boaddressbook->search() (line 355):
@param string $param['filter']='' filters with syntax like <name>=<value>,<name2>=<value2>,<name3>=!'' for not empty 

I don't know what that means exactly, or how to translate it into a valid request, but most likely it wants something like cat_id=15 or ''.

Nathan

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
el_es el_es
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [not-a-crosspost] XMLRPC vs addressbook search results in database error

On 19/09/13 15:33, Nathan Gray wrote:

>
>
>
> On Thu, Sep 19, 2013 at 7:46 AM, Lukasz Sokol
> <[hidden email]
> <mailto:[hidden email]>> wrote:
>
> ... &lt;/pre&gt;&lt;b&gt;nothing known about column
> 'none'!&lt;/b&gt;</b>
>
>
> This is an empty array (array()), not null: <member>
> <name>fields</name> <value> <array></array> </value> </member> I
> don't know what will be accepted as null.  Have you tried leaving out
> the fields member entirely?  Maybe lose the <array /> tag?
>
[trying with just <value></value> then - Invalid SQL through the filter thingy I suppose. ] :)
so it got through to querying the database, good...
but read below...

>
> 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...
>
> ...
>
> ... 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 ?
>
>
> This code doesn't have the concept of pre-defined filters.
>
> From boaddressbook->search() (line 355): @param string
> $param['filter']='' filters with syntax like
> <name>=<value>,<name2>=<value2>,<name3>=!'' for not empty
>

ok so with <array /> not in, and filter all=!'', I get...

<member>
        <name>filter</name>
        <value>all=!''</value> (or <value><string>all=!''</string></value> ...nope, same thing)
</member>

but result is still Invalid SQL...

ah ! and with value><string>=!''</string></value>

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  != '' AND contact_tid != 'D' AND
>>>>> look there >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>^^^^^^^^^^ here the filter lands!
>>>> trying to put a valid field name:
(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 &gt; 1379605768) 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_assistent,'') AS char)

putting the filter value simply 'true' gives...

<h3>Database error</h3>
<pre><b>db::column_data_implode(' AND ',Array
(
    [true] =&gt; <<<< why does it end as a name of a column???
    [0] =&gt; contact_tid != 'D'



> I don't know what that means exactly, or how to translate it into a
> valid request, but most likely it wants something like cat_id=15 or
> ''.
>

putting in <string>cat_id=!''</string> yields a different InvalidSQL:

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 ( (CONCAT(',',cat_id,',') NOT LIKE '%,0,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,30,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,167,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,82,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,99,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,75,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,7,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,76,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,77,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,78,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,79,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,80,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,14,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,81,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,84,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,159,%' OR CONCAT(',',cat_id,',') NOT L
IKE '%,97,%' OR C ...

(just an excerpt, it's huge, overall response got some 3760+8192+788 bytes... whoa.)

> Nathan
>

It means probably that I need to examine the boaddressbook->search function ;) for valid inputs.
to establish what it needs where; but also that the wiki is out of date L:(

Well, one thing at a time.
Tomorrow is also another day ;)

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
Ralf Becker Stylite AG Ralf Becker Stylite AG
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [not-a-crosspost] XMLRPC vs addressbook search results in database error

Hi Lukasz,

xmlrpc is a long time dead, do NOT use it. I will remove it, once I find
some time for it.

Use CalDAV/CardDAV instead.

Ralf

Am 19.09.13 18:26, schrieb Lukasz Sokol:

> On 19/09/13 15:33, Nathan Gray wrote:
>>
>>
>>
>> On Thu, Sep 19, 2013 at 7:46 AM, Lukasz Sokol
>> <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> ... &lt;/pre&gt;&lt;b&gt;nothing known about column
>> 'none'!&lt;/b&gt;</b>
>>
>>
>> This is an empty array (array()), not null: <member>
>> <name>fields</name> <value> <array></array> </value> </member> I
>> don't know what will be accepted as null.  Have you tried leaving out
>> the fields member entirely?  Maybe lose the <array /> tag?
>>
> [trying with just <value></value> then - Invalid SQL through the filter thingy I suppose. ] :)
> so it got through to querying the database, good...
> but read below...
>
>>
>> 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...
>>
>> ...
>>
>> ... 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 ?
>>
>>
>> This code doesn't have the concept of pre-defined filters.
>>
>>  From boaddressbook->search() (line 355): @param string
>> $param['filter']='' filters with syntax like
>> <name>=<value>,<name2>=<value2>,<name3>=!'' for not empty
>>
>
> ok so with <array /> not in, and filter all=!'', I get...
>
> <member>
> <name>filter</name>
> <value>all=!''</value> (or <value><string>all=!''</string></value> ...nope, same thing)
> </member>
>
> but result is still Invalid SQL...
>
> ah ! and with value><string>=!''</string></value>
>
> 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  != '' AND contact_tid != 'D' AND
>>>>>> look there >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>^^^^^^^^^^ here the filter lands!
>>>>> trying to put a valid field name:
> (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 &gt; 1379605768) 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_assistent,'') AS char)
>
> putting the filter value simply 'true' gives...
>
> <h3>Database error</h3>
> <pre><b>db::column_data_implode(' AND ',Array
> (
>      [true] =&gt; <<<< why does it end as a name of a column???
>      [0] =&gt; contact_tid != 'D'
>
>
>
>> I don't know what that means exactly, or how to translate it into a
>> valid request, but most likely it wants something like cat_id=15 or
>> ''.
>>
>
> putting in <string>cat_id=!''</string> yields a different InvalidSQL:
>
> 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 ( (CONCAT(',',cat_id,',') NOT LIKE '%,0,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,30,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,167,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,82,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,99,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,75,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,7,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,76,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,77,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,78,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,79,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,80,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,14,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,81,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,84,%' OR CONCAT(',',cat_id,',') NOT LIKE '%,159,%' OR CONCAT(',',cat_id
 ,'

>   ,') NOT L
> IKE '%,97,%' OR C ...
>
> (just an excerpt, it's huge, overall response got some 3760+8192+788 bytes... whoa.)
>
>> Nathan
>>
>
> It means probably that I need to examine the boaddressbook->search function ;) for valid inputs.
> to establish what it needs where; but also that the wiki is out of date L:(
>
> Well, one thing at a time.
> Tomorrow is also another day ;)
>
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/egroupware-developers
>


--
Ralf Becker
Director Software Development

Stylite AG

Morschheimer Strasse 15 | Tel. +49 6352 70629 0
D-67292 Kirchheimbolanden | Fax. +49 6352 70629 30

Email: [hidden email]

www.stylite.de | www.egroupware.org

Managing Directors: Andre Keller | Ralf Becker | Gudrun Mueller
Chairman of the supervisory board: Prof. Dr. Birger Leon Kropshofer

VAT DE214280951 | Registered HRB 31158 Kaiserslautern Germany

------------------------------------------------------------------------------
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/22/13.
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
eGroupWare-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
el_es el_es
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [not-a-crosspost] XMLRPC vs addressbook search results in database error

On 22/09/13 12:43, Ralf Becker wrote:
> Hi Lukasz,
>
> xmlrpc is a long time dead, do NOT use it. I will remove it, once I find
> some time for it.
>
> Use CalDAV/CardDAV instead.
>
> Ralf
>

[cut the history, considering the above]

Thanks Ralf,

Is the same true for SOAP too ?

I shall evaluate on CardDAV then.

Thanks&Regards,
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
Ralf Becker Ralf Becker
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [not-a-crosspost] XMLRPC vs addressbook search results in database error

Yeap, same is true for saop.

Ralf
--
Ralf Becker
Director Software Development

Stylite AG

Morschheimer Strasse 15 | Tel. +49 6352 70629 0
D-67292 Kirchheimbolanden | Fax. +49 6352 70629 30

Email: [hidden email]

www.stylite.de | www.egroupware.org

Managing Directors: Andre Keller | Ralf Becker | Gudrun Mueller
Chairman of the supervisory board: Prof. Dr. Birger Leon Kropshofer

VAT DE214280951 | Registered HRB 31158 Kaiserslautern Germany

> Am 23.09.2013 um 13:33 schrieb Lukasz Sokol <[hidden email]>:
>
>> On 22/09/13 12:43, Ralf Becker wrote:
>> Hi Lukasz,
>>
>> xmlrpc is a long time dead, do NOT use it. I will remove it, once I find
>> some time for it.
>>
>> Use CalDAV/CardDAV instead.
>>
>> Ralf
>
> [cut the history, considering the above]
>
> Thanks Ralf,
>
> Is the same true for SOAP too ?
>
> I shall evaluate on CardDAV then.
>
> Thanks&Regards,
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/egroupware-developers

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
eGroupWare-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
el_es el_es
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [not-a-crosspost] XMLRPC vs addressbook search results in database error

On 23/09/13 19:23, Ralf Becker wrote:
> Yeap, same is true for saop.
>
> Ralf
>
Thanks.

And thanks for keeping CardDAV up to spec - i copy/pasted example query from RFC6532 and
I got output :) just about what I need.

Lukasz


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
eGroupWare-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
Loading...