RE: [Phplib-users] phplib: dynamic page_open values
Brought to you by:
nhruby,
richardarcher
|
From: Brian P. <bp...@ct...> - 2002-04-30 21:27:31
|
I'm not sure I understand exactly what you're doing, but one thing I would recommend is that you don't split the data into separate databases. Instead, you might consider creating another table that tracks the different groups. groups ---------- id name Then you just have to associate each user and each set of data with the corresponding group by adding a field to those tables called 'group_id' for example. When a user logs in, you look at their group_id, and store that in the $auth variable (or somewhere). Then, whenever you present data, you just filter it based on that group_id. I'm doing this on a number of sites and it is working beautifully. It offers the convenience of an unlimited number of groups, a centralized user database, and if you ever need to merge data or summarize data, it will be MUCH easier than trying to query across multiple databases. This requires a tad more work on the setup initially, but it's much flexible. With the way you described, you would have to copy your database structure for each client.. and if a database change is required, each database would have to be updated. That hurts just thinking about it.. especially if this project grows in scope beyond what you initially expected. Hope this helps. If this doesn't make sense, or you need more assistance, please don't hesitate to ask. bpopp - http://www.bpopp.net -----Original Message----- From: David Glenn [mailto:dav...@em...] Sent: Tuesday, April 30, 2002 2:33 PM To: php...@li... Subject: [Phplib-users] phplib: dynamic page_open values I have a problem I haven't cracked yet. I have a centralized site (one complete set of php pages) that will be used by many client groups, each of which need to access their own database (each database with its own phplib auth table set as well as application data). So it would seem if I could call page_open with a pertinent key value and then set the sess/auth/perm values dynamically on each page I would be on my way. I can call an initializer page with a name/value of the key value, and then it would be great if that was stuck in a session for each page to use (via an header.inc or somesuch). However, with phplib, I can't get to the session values unless I already know the pertinent page_open sess value. Mr. Chicken please meet Mr. Egg. Ideas, prior solutions, something I'm missing? Thanks. David Glenn da...@so... --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002 _______________________________________________ Phplib-users mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phplib-users |