Themselves wrote:
> 
> Hi guys, I've come up with a situation in my application where serializing
> a
> select object to store it in a session variable would be remarkably
> useful,
> but it isn't working. It's just throwing the usual "can't serialize a PDO
> object" error. This was apparently fixed in
> http://framework.zend.com/issues/browse/ZF-4600. Here's my basic code.
> 
> class DbTable_Candidates extends Zend_Db_Table_Abstract
> {
>     /**
>      * @var string Table name
>      */
>     public $_name = 'candidates';
> 
>     /**
>      * @var string Primary key
>      */
>     public $_primary = 'id';
> }
> 
> ...then, later on...
> 
> function fetchList($criteria) {
>    $table = new DbTable_Candidates();
>    $adapter = $table->getAdapter();
>    $select  = $adapter->select();
> 
> ... a bunch of stuff gets added to the $select object....
> 
>    $serialize = serialize($select);
> }
> 
> and the error: You cannot serialize or unserialize PDO instances
> 
> This is on 1.7.8 of the framework, by the way.
> 
> 

Oh. Ok, so this functionality works just fine, I just didn't read the URL I
linked correctly, the functionality to serialize Zend_Db_Select objects
isn't added until the 1.8 release, so if you're trying to get it working
with an earlier version, upgrade. 
-- 
View this message in context: 
http://www.nabble.com/Serializing-select-objects-supposed-to-be-working-but-isn%27t.-tp23212103p23269501.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to