Re: PDO and SAP HANA prepared statements issue
| From: | Jeff | Date: | Tue, 26 Jan 2016 14:01:21 +0000 |
| Subject: | Re: PDO and SAP HANA prepared statements issue | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-49084@lists.php.net to get a copy of this message | ||
Greetings,
On 01/26/2016 08:18 AM, Karl DeSaulniers wrote:
> On Jan 26, 2016, at 7:10 AM, Alko Kotalko <alko.kotalko@gmail.com> wrote:
>
>> Hi,
>>
>> I have a working connection from PHP to SAP HANA through PDO and regular
>> ODBC commands.
>>
[...snipped...]
>>
>> For example:
>> "SELECT * FROM dummy WHERE col1=$1 AND col2=$2 AND col3=$1" works.
the "$" character within a php string enclosed with quotes (") is
special. you /might/ have some success if you enclose the string in
single quotes (') instead. also personally I prefer named parameters
(:foo) or even "foo=?" (question mark) rather than $1...n etc.
[...snipped...]
regards,
J