Serializing mySQLi result resource

Serializing mySQLi result resource

am 08.06.2008 14:26:45 von sublimino

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

Re: Serializing mySQLi result resource

am 09.06.2008 19:00:55 von Yves Sucaet

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"
To:
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