RE: [PHP-WIN] Save classes to db?
| From: | Dale Attree | Date: | Tue, 26 Jun 2007 13:11:54 +0000 |
| Subject: | RE: [PHP-WIN] Save classes to db? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-28144@lists.php.net to get a copy of this message | ||
Hi there,
You would use a blob or text field.
You will have to serialize the object before saving it to db.
Then when you retrieve it, you will have to deserialize it and then eval()
the object so as to active all the values.
-----Original Message-----
From: Gustav Wiberg [mailto:gustav@hmn.se]
Sent: 26 June 2007 02:28 PM
To: 'php windows' (php-windows@lists.php.net)
Subject: [PHP-WIN] Save classes to db?
Hi there!
Is it possible to save classes (objects) into a database in PHP? What
fieldtype should be used then (MySQL) ?
Best regards
/Gustav Wiberg
This e-mail may contain confidential information belonging to the sender which is legally
privileged. It is the responsibility of the recipient to ensure that any e-mails or attachments are
virus free as Jacklin Enterprises accepts no responsibility. Should you not be the intended
recipient then any disclosure, copying, distribution or the taking of any action in reliance of the
contents of this email is strictly prohibited. If you have received this transmission in error,
please notify the sender immediately.
Jacklin Enterprises Limited is registered in England No. 4398837
Registered office: 18 Bentinck Street, London, W1U 2AR. VAT Registration No: 831 0256 68
This email has been scanned by the MessageLabs Email Security System.