Reply to Re: Objects saving and restoring with MySQL

Your name:

Reply:


Posted by Jim Michaels on 02/12/06 04:39

serialize() puts out binary data. VARCHAR and TEXT are made for character
data. use BLOB(), TINYBLOB, or MEDIUMBLOB.

"NC" <nc@iname.com> wrote in message
news:1137004839.342320.193870@f14g2000cwb.googlegroups.com...
> 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.
>
>> Are there any tutorials that you can recommend on this subject?
>
> The Manual is always a good place to start:
>
> http://www.php.net/serialize
>
> Cheers,
> NC
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация