From: Karsten D. <k.d...@tu...> - 2001-03-26 14:17:27
|
On Sat, Mar 24, 2001 at 07:32:56PM -0600, Geoff Staples wrote: > Add the following variable to config.php: >=20 > $dbp =3D ""; >=20 > $dbp can be set to a prefix for database tables. When it is empty, the > tables will be unchanged from their current "no prefix" names. Good. > Setup up a variable for every table in the system using the following > example as a model. Place them toward the bottom of config.php: >=20 > $tbl_stories =3D $dbp."stories" Good. > Edit all code in the system per the following example: > [...] > Do this for all SQL calls in the system. Good. > 1. Is "$dbp" an appropriate name for the database table prefix variable? I would say yes. If one would introduce the multilinugal approach I describe in my (other) mail, another prefix might be used, called $lang or whatever. I would add this through a patch being applied during makedistro.sh anyway, so we don't have to worry about htis right now. > 2. Is the config.php file the best place to put the "$tbl" variables? In a way, yes. If we decide on a database abstraction layer, we might introduce a seperate file with databse varibales, subclassing (in case of phplib) or whatever we need. We should put those definitions there, but until then... > 3. Is "$tbl_stories" the appropriate name for the variable to contain the > table name for the stories table? I would call them that way. By doing that all table related variables would show up in the same section of the phpdic element list, and one could always see at first glance, what the variable is for. BTW: If we have all the table names in a single file, it should be easy to give them more consistent names. Although it might be hard enough to settle on a definition of consistent :-) Regards, Karsten --=20 Why do we have to hide from the police, daddy? Because we use emacs, son. They use vi. ----------------------------- mailto:k.d...@tu... w=B3: http://www.k-fish.de/ gpg: http://www.k-fish.de/mykeys.gpg |