See p 153 of the above book for working equivalent of LIMIT in Oracle syntax.
$query = 'SELECT * FROM ('.$query.') WHERE rownum BETWEEN '.intval($offset).' AND '.intval($till);
See the doc for ROWNUM at http://docs.oracle.com/cd/E11882_01/server.112/e26088/pseudocolumns009.htm#SQLRF00255
SQL> select * from (select city from locations order by city) where rownum between 1 and 5; CITY ------------------------------ Beijing Bern Bombay Geneva Hiroshima SQL> select * from (select city from locations order by city) where rownum between 3 and 5; no rows selected SQL>
970022 wrote:Exactly the opposite. tnsnames.ora is used only by client processes. tnsnames.ora is the client's 'telephone directory', giving it (the client process) the details on how to reach a specified target database. tnsnames.ora means nothing to a server. It only exists on servers because servers sometimes also run client processes.
Sorry, I'm new to Oracle. But, I thought that tnsnames.ora is only a server-side file,
and even if it were on the client I'm using direct-addressing so I don't see how it would affect anything? I have data successfully persisted in the database so my configuration was working at one point.
970022 wrote:above requires basic OS/networking to be functional.
DB and client are on same network, but different machines.
Connecting locally with SQLPlus works fine.connecting to local DB can succeed WITHOUT any listener or network packets so is 100% not relevant!
970022 wrote:161 is not a lot!
It appears I am having my issue because client PHP is creating too many connections to the database.
SQL> select count(*) from v$process;
I adjusted max sessions and processes and PHP parameters oci8.max_persistent and oci8.persistent_timeout and it appears stable, but still a lot of connections as seen above.