I use sybase and want to create multiple pages through php for some high volume queries. In all the examples I've seen on the web, the query seems to be executed from scratch every time. This seems like a waste of resources. I'd like to do this the first time I enter a script called query.php:
--connect to database
--run query
Then, using session management, I'd like to process rows in the results set using sybase_fetch_array when formatting the individual pages. But sybase_fetch_array only seems to work if it is run during the first iteration after the query is executed. I tried to register the sql_results variable returned from the query, but as far as php is concerned, it is not really an array. I would have to populate a new array using sybase_fetch_array and register it. But this seems like a duplication of effort. If I run $sql_result = sybase_query($sql, $connection) , I'd like to access $sql_result itself and not a copy.
--connect to database
--run query
Then, using session management, I'd like to process rows in the results set using sybase_fetch_array when formatting the individual pages. But sybase_fetch_array only seems to work if it is run during the first iteration after the query is executed. I tried to register the sql_results variable returned from the query, but as far as php is concerned, it is not really an array. I would have to populate a new array using sybase_fetch_array and register it. But this seems like a duplication of effort. If I run $sql_result = sybase_query($sql, $connection) , I'd like to access $sql_result itself and not a copy.