googleads / googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP
Apache License 2.0
656 stars 769 forks source link

StatementBuilder unsupported OR operator #743

Closed gassius closed 2 years ago

gassius commented 2 years ago

As per Publisher Query Language (PQL) a WHERE statement should be able to handle [AND | OR]

However, using the OR operator returns [PublisherQueryLanguageContextError.UNEXECUTABLE @ 'OR' is unsupported.]

Sample code:

$statementBuilder = (new StatementBuilder())
            ->where('AD_UNIT_NAME LIKE :pattern1 OR AD_UNIT_NAME LIKE :pattern2')
            ->withBindVariableValue(
                'pattern1',
                '%_NP_%'
            )
            ->withBindVariableValue(
                'pattern2',
                '%_content_%'
            );

Using "googleads/googleads-php-lib": "^56.0", and v202202

Is there any workaround for this?

PierrickVoulet commented 2 years ago

Hi @gassius - This issue is not specific to this library but Ad Manager API, please use their support.