Re: about structure.



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 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

.



Relevant Pages

  • Web Developers - Happy Hearts And HDTV! - Lockergnome
    ... Certificate on your MSIIS Web server. ... getting data from a database is only half the problem. ... Zend recently started a series about building rock solid code in PHP. ... which provides bulk database conversion. ...
    (freebsd-questions)
  • RE: Access denied for user root@localhost (using password: NO)
    ... >> Do you run php database driven apps on the same server as you use to ... are selling/giving/whatever customer access to php on this server, ...
    (freebsd-questions)
  • Re: Multithreading for standalone php
    ... I'm working on a project that will need to connect to 2 different servers and to speed things up (being ssl) I was hoping to be able to do this simultaneously. ... I need my web visitor to hit a button and be able to enter information on another server while at the same time my system is looking up data ... Would this be the sort of thing possible with PHP or would it have to use threads? ... You probably could still spawn a C/C++ program to do the database work, but I'm not sure it's worth the extra effort and complications. ...
    (comp.lang.php)
  • Re: Design issue: Preload data or get on request
    ... > windows application that uses the data stored on an SQL server. ... > a number of different tables in the database. ... > required or load the data for each user request and not maintain any cache. ... the XML document at the web service server. ...
    (microsoft.public.dotnet.general)
  • Re: OT: why are LAMP sites slow?
    ... > class of database-backed web sites built using those components. ... > painfully slow even using seriously powerful server hardware. ... and compounded by probably an unoptimized database. ... don't want to start flame wars here about PHP; I use PHP to build client ...
    (comp.lang.python)