PDO and SAP HANA prepared statements issue

From: Date: Tue, 26 Jan 2016 13:10:00 +0000
Subject: PDO and SAP HANA prepared statements issue
Groups: php.db 
Request: Send a blank email to php-db+get-49082@lists.php.net to get a copy of this message
Hi, I have a working connection from PHP to SAP HANA through PDO and regular ODBC commands. The issue is that through PDO I can not get any prepared statements to work. None of the notations (?, $, :) work. The response from the server (fetch) gets me empty field values for all selected columns and if I try fetchAll the PHP script runs out of memory. ODBC commands actually work with the ? and colon ($) notations. But not with colon (:). I suppose this is due to the lack of named parameters support in ODBC commands (haven't actually confirmed that though). The $ notation brings me the closest to named parameters because a specific number can be repeated. For example: "SELECT * FROM dummy WHERE col1=$1 AND col2=$2 AND col3=$1" works. However it is not ideal. I would like to know if anyone has any experience with SAP HANA and I can offer my help and participation in order to debug the possible problems with PDO<->HANA connectivity issues (in regards to prepared statements). BR Aleš

« previous php.db (#49082) next »