Re: about structure.
- From: "Kentor" <kentor@xxxxxxxxx>
- Date: 19 Dec 2006 10:37:27 -0800
I see. I guess I will try that as soon as I get some time. It will
definitely save me some time in the long run. Thanks for your help.
J.O. Aho wrote:
Kentor wrote:
J.O. Aho wrote:
if you want the name for an area, then you just make a simple query againI thought about using a database... but wouldn't this create waaaay too
$query="SELECT AreaName WHERE AreaID='$usersubmittedvalue'";
$result=@mysql_query($query);
$data=mysql_fetch_array($result);
echo $data['AreaName'];
Of course if you want to use a load of checkboxes, it works too, just modify
the code somewhat, but I hope you got some idea how to do things.
much DB interaction for nothing... I mean each time any user on the
website needs to use the list they would query the db... that will be a
LOT of querys per day... or even per minute... and as the website grows
it will be too many per second.. no?
Sure, there will be connections to the database, but if we would take your
argument even one step further,
"I thought about using php... but wouldn't this create waaaay too much php
interaction for nothing... I mean each time any user loads a page, the web
server needs to call upon php... that will be a LOT of php-parsing per day...
or even per minute... and as the website grows it will be too many per
second.. no?"
That would be a great argument for making statical pages instead of dynamical.
I doubt your page will be running on a i286 machine with 8MB of ram, the
server will manage the the extra load of SIMPLE sql equerries in the same
manner as it would be able to let the php to parse the code on each
php-document. There are loads of heavily used sites that uses php and a
database, look at the most popular one, google.com, and it does give you a
damn lot of services, not only search engines, maps, newsgroups and so on, of
course not everything is running on the same machine, but if your site gets to
that size/popularity, then you will be affording to have more than one server too.
You can make a visit to pegasos.org, almost everything you see on that site
comes directly from a database, it has somewhere around 800 unique visitors
per day and many users visits it more than once, yes there are a load of
database connections, queries, but still it's a machine with just a single
core PowerPC G4/1000MHz with 1GB ram and I doubt you could tell that by
visiting it.
--
//Aho
.
- References:
- about structure.
- From: Kentor
- Re: about structure.
- From: J.O. Aho
- Re: about structure.
- From: Kentor
- Re: about structure.
- From: J.O. Aho
- about structure.
- Prev by Date: Re: converting numerical values to char
- Next by Date: Re: about structure.
- Previous by thread: Re: about structure.
- Next by thread: Re: about structure.
- Index(es):
Relevant Pages
|