I've this problem with a Sybase IQ database (version SELECT @@version
shows Adaptive Server IQ/12.5.0/0306) using the PHP SQL Anywhere extension.
I can't select all rows, i.e. SELECT * from anytable
always returns 30 rows.
The only workaround I've found is using SELECT TOP 1000 * from anytable
(maximum is 32767) but there are certain situations where I need all rows.
Any help is much appreciated.
EDIT: example script (much like the documentation)
$conn = sasql_connect("HOST=host:port;DBN=dbn;UID=uid;PWD=pwd");
if (!$conn) { echo "Connection failed."; die(); }
$result = sasql_query($conn, "SELECT * FROM dba.anytable" );
sasql_result_all($result); // display 30 rows in a formatted table
sasql_free_result($result);
sasql_disconnect($conn);
EDIT: specs of both machines where I'm experiencing the same exact problem:
Development machine:
- Windows 7 x64
- PHP 5.4.23 TS x86
- SAP SQL Anywhere PHP Module for PHP 5.4
- SAP SQL Anywhere Database Client 12.0.1.4134
Production sever:
- CentOS 6.6 x64
- PHP 5.5.23 NTS (x86_64 as per YUM)
- SAP SQL Anywhere PHP Module for PHP 5.5
- SAP SQL Anywhere Database Client 12.0.1.4127