Skip to Content
May 02, 2017 at 06:16 PM

Hana PHP query do not return all rows


Hello everybody,

I'm writing some code in a PHP page and I want to retrieve information form the customer table in SAP Business One. I'm on a Debian Linux.

I have a strange behavior with my php code. I do not get all rows if I want to retrieve OCRD CodeName.

For example :

$select = 'SELECT left("CardName",19) FROM "SBO_MyBase"."OCRD"' ;
$select = 'SELECT "CardName" FROM "SBO_MyBase"."OCRD"' ;
it returns 14 rows out of 1600 in the database
if I query
$select = 'SELECT left("CardName",18) FROM "SBO_MyBase"."OCRD"' ;
It returns all 1600 rows

I thought it was a matter of fields length but if query the OCRD Address field that is as long as the CardName field, I also get all records.
$select = 'SELECT "Address" FROM "SBO_MyBase"."OCRD"' ;

Does anybody know this behavior? Is it a bug?

Thank you