Posted by David Wahler on 01/11/06 23:07
NC wrote:
> Gav wrote:
> >
> > If you had a class user with variables id, name, password. How
> > would you save this object or its variable date to a MySQL
> > database?
>
> By using serialize($your_object) and writing the result into a TEXT or
> VARCHAR field.
I don't see how that's better than having separate database fields for
each object member. It makes it very difficult to efficiently query the
database based on different criteria, or to migrate to any language
besides PHP.
-- David
Navigation:
[Reply to this message]
|