Actually the static variables will be used to make the
query.
ie
I want these static variables to be used so that my
url can be transformed into a numeric reference for
the db query
website.com/finance/
finance gets parsed out of URL to be used in where
condition
$article_type = array(news = 1,opinion =
2,finance = 3);
$sql = SELECT * FROM articles WHERE article_type =
'2';
/* where condition will contain other criteria as well
(date/region) */
olinux
--- Cal Evans [EMAIL PROTECTED] wrote:
Actually, if they are static variables that rarely
or never change, I would
stick with the include file. It's faster than
making a database connection
and selecting them.
=C=
*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*
-Original Message-
From: olinux [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 14, 2002 11:40 AM
To: [EMAIL PROTECTED]
Subject: [PHP] make a set of variables available to
all visitors?
What would be the best way to make a set of
variables
available to all visitors?
example:
if I stick all variables in a separate file and
include - include(settings.php); - that works fine.
seems that this is a lot of overhead to include
these
on every page. These variables would never change
(they basically turn an alpha string into numeric to
speed up queries.) I don't think hard coding would
be
a great solution either...
simplified example:
one set of variables to be included on all pages
refer
to the article type - i would like to use urls that
make sense to the visitor rather than number strings
so -
$article_type = array(news = 1,opinion =
2,finance = 3);
Maybe it would be best to simply query for WHERE
article_type = 'news' etc.
Thanks much,
olinux
__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php