cancel
Showing results for 
Search instead for 
Did you mean: 

How do I call the Magento API SOAP V2 with multiple complex filters to the same field?

How do I call the Magento API SOAP V2 with multiple complex filters to the same field?

How do I call the Magento API SOAP V2 with multiple complex filters to the same field? In my case I use the salesOrderList function.

This source code does not work:

$params = array(array(
        'complex_filter' => array(            array(
                'key' => 'increment_id',
                'value' => array(
                    'key' => 'nlike',
                    'value' => 'a_%'
                ),
            ),            array(
                'key' => 'increment_id',
                'value' => array(
                    'key' => 'nlike',
                    'value' => 'e_%'
                ),
            ),
        )
    ));$result = $client->__call('salesOrderList', $params);

The final sql code only contains:

AND (increment_id NOT LIKE 'a_%')

But it should contain:

AND (increment_id NOT LIKE 'a_%') AND (increment_id NOT LIKE 'e_%')

For SQL it doesn't matter how many 'LIKE's I apply to a field?!!

What am I doing wrong?