1 (edited by StevenBullen 2008-02-08 12:23)

Topic: Switch on query build true/false

Might be a silly request.

If you have this code...

    ($hook = get_hook('in_qr_get_new_topics')) ? eval($hook) : null; 
    $result = $db->query_build($query, true) or error(__FILE__, __LINE__);

How do I change true to false with the previous hook?
any chance of making this into a switch for the query builder?

EDIT: or better still.. should I NOT be changing this to false? tongue

Re: Switch on query build true/false

Could you give me an example of why you would change an unbuffered query to a buffered query?

Re: Switch on query build true/false

Ok let me try something and I will come back to you on that one.

Re: Switch on query build true/false

I added support for unbuffered queries, but to be completely honest, I'm uncertain how much of an optimization it is. In theory, it should decrease memory consumption by not buffering the complete query result before returning, but I'm really not sure how much it helps. The only really big result set we handle is for the main topic query. Moving it into the query builder makes sense.

"Programming is like sex: one mistake and you have to support it for the rest of your life."