PDO statement/resultset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,

Let me know if there is a better place to post this.

I am playing with the idea of creating a true (KISS) abstraction layer that makes full use of PHP5's OOP support. So logically it would make sense to make use PDO wherever possible, however, one of PDO's design decisions was to make a prepared statement object also a result set (another question: ... why?) a script can not make use of the a statement more than once without completely fetching all the data it needs from the first query, before executing the next.

A likely scenario is that the prepared statement is executed and then before the script is done with processing the result, the same statement (with different binds) will need to be executed again, also using the result set from that statement.

Does PDO provide a method to deal with this problem? From what I understand the only solution would be to prepare a new statement for each query, even for queries with the same structure which defeats the purpose of a prepared statement(?) Is there a solution that is a bit better?

Regards,

David

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux