saintsystems / odata-client-php

OData Client Library for PHP
MIT License
141 stars 103 forks source link

Special characters not working in where condition #114

Open ravatsinh opened 1 year ago

ravatsinh commented 1 year ago

$q->where('field_name', '=', "test'value")->get();

Getting error {"error":{"code":"BadRequest","message":"There is an unterminated literal at position.........

anderly commented 1 year ago

Looks like you're missing a single quote after 'field_name

ravatsinh commented 1 year ago

Looks like you're missing a single quote after 'field_name

Sorry updated now But issue in test'value single quate

anderly commented 1 year ago

You may need to escape your single quote using \'.

Example: $q->where('field_name', '=', "test\'value")->get();