Framework design help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anoop123
Forum Newbie
Posts: 1
Joined: Wed Nov 20, 2013 2:19 am

Framework design help

Post by anoop123 »

Hello,

I am new to this forum. I need help regarding the design of a system.

I have a content table with fields id,title,content and a api keys table with feild id,apikey
These two tables are related to each other using content_apis with fields content_id, api_id

So when a user using a particular api version would receive those content related to that api alone.

Now when I create a new api key and a user uses this new api key, he wont receive any content unless I create the content relations with the new api key.

When creating the api key I can create the entry in the content_apis with the new api key for each content. But is that the right way, and if there is a large number of content would this be the nice approach?

Please help on any other ways I can do this? Providing an interface to select content related to this api key also came in to my mind but that would also be difficult if there is a large number of content?

Please advise

Thank you
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Framework design help

Post by requinix »

Sure does sound like a lot of work. Maybe it would be easier to put the content into groups, then assign the groups to the API keys?

Some more background would be nice to hear. What are these content things and why are they restricted with the API like that?
Post Reply