Re: FN-FORUM: PHP, MySQL and Arrays
date posted 25th January 2006 16:44
On 25 Jan 2006, at 15:26, D D Glendinning wrote:
> In the admin, I want to be able to upload a new PDF, and assign it to
> a private library, and I do this by storing the ID of the client whose
> library I want it added to in the Target field of my PDFs table.
> Problem occurs when I want to be able to assign this PDF to several
> clients... I cannot store an array of Client IDs!!
>
I see that others have suggested the "proper" way to do it with another
table, but if you wanted to "cheat" you can store an array in a simple
varchar field by using serialize() on the array before you save it,
and unserialize() when you extract it from the table.
Best regards,
Ray
------------------------------
Ray McGinty Information Design
Specialising in web application development,
e-commerce and design for print.
http://www.rmid.co.uk
Listed on the National Business Link Consultants Register