Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 138139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:13:01+00:00 2026-05-11T07:13:01+00:00

I need to run a query which will retrieve a huge amount of records.

  • 0

I need to run a query which will retrieve a huge amount of records.
This means I can’t use the ZF wrappers for mysqli, which deep below the hood uses mysqli-store-result. So, is there a wrapper in ZF for using the mysqli mysqli-use-result link text, which will return an Iterator/record-set/resource and not the array with all the results already loaded into the memory, Or do I need to implement it myself?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T07:13:01+00:00Added an answer on May 11, 2026 at 7:13 am

    First of all, no Zend Framework database adapters make use of ext/mysql. There are adapters for ext/mysqli and ext/pdo_mysql.

    In the MySQLi adapter, it always calls mysqli_store_result() (see Zend/Db/Statement/Mysqli.php, near line 250), which means it only supports buffered query results. Zend Framework does not currently support any option to change this, so you could try to edit that line of code yourself to use mysqli_use_result().

    edit: In the PDO_MySQL adapter, the default is to use buffered queries.

    PHP 5.4.6 source, file ext/pdo_mysql/mysql_driver.c, line 590, in function pdo_mysql_handle_factory():

    H->buffered = H->emulate_prepare = 1; 

    Note that regardless of using unbuffered queries, if you call fetchAll() on a database wrapper class, you’ll fetch all rows of your huge result set, and probably exceed PHP’s memory limit. So instead, you must begin a query and write a loop to fetch rows one at a time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to be able to run an Oracle query which goes to insert
I need to run a query that returns a list of users, along with
I need to run a JOIN query on a solr index. I've got two
I want to run a sql query on a specific schedule (weekly) and need
i need run code that will create a database and populate tables. i am
I need to run a script that will generate the projects.list file when a
We have a piece of software which can run on several different graphics cards,
I am having around 1000 different id's for which I need to run the
I have a mysql table like that and i need to run a query
I'm trying to write a simple Ubiquity command that will run a query on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.