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