I have a DB project going and every time I query the DB for data
from a particular table, I want to include a set of variables (that get
set based on the query result).  I was thinking of doing something like
this:

    $sql = "..."
    $result = ....;
    include 'variables.php?table=$table';

    However, every time I try that, it tells me it can't find
'variables.php'.  However, if I rename the file to 'variables.inc', it
does find it (though it doesn't pass any arguments to it then).

    The first method tells me it's not in the include path.  Okay,
easily fixable in php.ini, however, I don't want this extra path info to
apply to the whole server (which is running several vhosts).  How can I
adjust the include path just for this particular vhost?

    Or, is there a better way to do what I'm trying to accomplish?  Make
it a function perhaps?  A call that would look kinda like this perhaps:
variables($table) ?  But then, how do I get to the actual variables?

    AMK4

--
W |
  |  I haven't lost my mind; it's backed up on tape somewhere.
  |____________________________________________________________________
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
  SysAdmin / Websmith                           .     800.441.3873 x130
  Photo Craft Laboratories, Inc.             .        eFax 248.671.0909
  http://www.pcraft.com                  .         3550 Arapahoe Ave #6
  .................. .  .  .     .               Boulder, CO 80303, USA



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to