Serializing mySQLi result resource

Hello,

Is it possible to serialize a MySQL(i) result resource? I am looking
to insert results into the eAccelerator cache but the returned
resource does not appear to be recognised by mysqli_fetch_assoc.

Thanks,


Andy

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
sublimino [ So, 08 Juni 2008 14:26 ] [ ID #1955400 ]

Re: Serializing mySQLi result resource

It is definitely possible, but I'm not sure if any standard solutions exist.
You could encapsulate your mysql_query() function into a class that has a
Serializable() method. You'd have to write your own method for that though.

Too bad MySQL doesn't support the "select.... for xml" construction that
SQLServer has, because then you could simply serialize the XML-output from
your query.

PEAR has two alternate packages for caching:
http://pear.php.net/packages.php?catpid=3&catname=Caching Maybe that's a
starting point as well?

HTH,

Yves

----- Original Message -----
From: "Andrew Martin" <sublimino [at] gmail.com>
To: <php-db [at] lists.php.net>
Sent: Sunday, June 08, 2008 7:26 AM
Subject: [PHP-DB] Serializing mySQLi result resource


> Hello,
>
> Is it possible to serialize a MySQL(i) result resource? I am looking
> to insert results into the eAccelerator cache but the returned
> resource does not appear to be recognised by mysqli_fetch_assoc.
>
> Thanks,
>
>
> Andy
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Yves Sucaet [ Mo, 09 Juni 2008 19:00 ] [ ID #1955509 ]
PHP » gmane.comp.php.database » Serializing mySQLi result resource

Vorheriges Thema: MDB2 help needed
Nächstes Thema: bcrypt ideas