FN-FORUM: PHP, MySQL and Arrays
date posted 25th January 2006 14:51
Right,
This has come as a surprise to me (I am sure it won't for most of
you!), but in the last 3 years I have not come accross this problem!!
Basically, building a small interface for tracking some files. Idea is
there are a number of accounts, who each have their own "Private
Library". In Addition to this, they can all access a "Public Library".
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!!
If there could only be one PDF per client, I could store it in a field
in the Clients Table, but its a one to many between client and PDFs,
so only way I can think of doing it is by doing str_replace() and
adding or removing the ID of the client to the list...
Any other ideas?
Thanks,
D