You are here: Re: about structure. « All PHP « IT news, forums, messages
Re: about structure.

Posted by J.O. Aho on 12/19/06 13:59

Kentor wrote:
> J.O. Aho wrote:

>> if you want the name for an area, then you just make a simple query again
>> $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.
> I thought about using a database... but wouldn't this create waaaay too
> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация