You are here: Re: Advice about fetching user information « PHP Programming Language « IT news, forums, messages
Re: Advice about fetching user information

Posted by Sandman on 11/23/06 14:23

In article <EfydnUyi9uhnBvjYnZ2dnUVZ_u-dnZ2d@comcast.com>,
Jerry Stuckle <jstucklex@attglobal.net> wrote:

> <snip>
>
> > ## index.php
> > require_once("member.php");
> > print member_name(12);
> >
> > ## member.php
> > $q=mysql_query("select id, name, label from members");
> > while ($r=mysql_fetch_assoc($q)){
> > $GLOBALS["members"][$r["id"]] = $r;
> > }
> >
> > function member_name($id){
> > $m = $GLOBALS["members"][$id];
> > $online = in_array($id, $GLOBALS["surfers"]) ? "on" : "off";
> > return icon("online/$online") . " $m[name] $m[label]";
> > }
> >
> > ##
>
> <snip>
>
> Looks like you need as SQL database.
>
> You may have to change your logic a little - I don't know enough of the
> detaisl. But it's the right way to go.
>
> You can implement a small, lightly loaded site like this in flat files,
> as you're doing. But there comes a time where that is no longer
> feasible, and it's time to start using a database of some sort - that's
> what they were made for. And a SQL RDB makes a lot of sense.

Eh? I *AM* using MySQL. As shown in my code above. Using MySQL for
this takes too long.


--
Sandman[.net]

 

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

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