I built a document upload admin screen, where my client can browse and upload pdf documents to a mysql dbase.
I have two separate tables for the Agendas, and one for Minutes. both have separate table names “upload” and “upload_mins”.
on the index.php page, I have the page fetch each row of the database, and display all of the valid documents on a “download” page.
I have come a across a problem.
Each dbase is set to increment ID. now that there is two databases, they are coming to utilize the same ID.
so I am pulling from the Agenda table:
http://www.example.com/clerk.php?ID=77
and I am pulling from the Minutes table also:
http://www.example.com/clerk.php?ID=77
and they happen to have the same increment ID.
Is there some way to avoid this? Can I add a field parameter to the minutes to make sure that they don’t have the same URL when pulling documents?
Create a integer field, or txt field?
If these are just documents, you could store them in a single table but have a column called
typethat differentiates between minutes and agendas. That way, IDs will be unique.You could also extend the
typescolumn be a foreign key to atypestable, so you can extend it to include additional document types such as spreadsheets in the future easily.This would also aid the front-end display, as you would only need one query to fetch the documents within a batch or timeframe, but add them to differing arrays. For example: