Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #11233

Re: Best strategy for creating an application scoped variable?

Path csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From "Peter H. Coffin" <hellsop@ninehells.com>
Newsgroups comp.lang.php
Subject Re: Best strategy for creating an application scoped variable?
Date Thu, 27 Jan 2011 20:40:03 -0600
Organization A noiseless patient Spider
Lines 19
Message-ID <slrnik4b43.2mh.hellsop@nibelheim.ninehells.com> (permalink)
References <b0e12769-769c-4b04-acbe-31c418af3a1a@n18g2000vbq.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Info mx01.eternal-september.org; posting-host="le/2G4+BNpieVhQI6uJ2Lw"; logging-data="14057"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tW0PsG92/vN3N4dISLj0y"
User-Agent slrn/0.9.9p1 (OpenBSD)
Cancel-Lock sha1:pOeIYqj6e29D0edkqDVltq/fOnk=
Xref csiph.com comp.lang.php:11233

Show key headers only | View raw


On Thu, 27 Jan 2011 16:08:01 -0800 (PST), laredotornado@zipmail.com wrote:
> Hi,
>
> I'm using PHP 5.2.  I would like to populate a hash from a database
> query.  The hash should be available to all users of the application
> and would only be updated very occasionally.  The database query is
> expensive, and I would prefer only to run it once, whenever PHP was
> restarted, or on the rare occasion when the database data changed.
> What is the best strategy for implementing this hash?

I'm confused. What "hash" do you want to "populate"? Do you just want to
stick a pregenerated value in a table? Maybe you need an insert/update
trigger?

-- 
76. If the hero runs up to my roof, I will not run up after him and 
    struggle with him in an attempt to push him over the edge. I will 
    also not engage him at the edge of a cliff. (In the middle of a 
    rope-bridge over a river of lava is not even worth considering.)

Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Best strategy for creating an application scoped variable? "laredotornado@zipmail.com" <laredotornado@zipmail.com> - 2011-01-27 16:08 -0800
  Re: Best strategy for creating an application scoped variable? "Peter H. Coffin" <hellsop@ninehells.com> - 2011-01-27 20:40 -0600

csiph-web