using array in php

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
im working in an online game project using php . with 9000 users as
start who register so far

anyway to make some reports about the users (example best users with
higest points ... worrest users with low points and so on) one of
co-workers with me suggest to use array insted of store the data in the

database everytime user do an action .

the idea is when a user was to see any reports the users ID will store
in an array and will calculate the points and store them in this array
(users id is the key for this array) .. then sort this array the way we

want and list it

i like the idea but i think about the loading what if there is million
user for example should it be problem ??

im new in php that why i ask this  

thanks in advance

Re: using array in php

Where do you plan to keep the array?  The data that goes into your
array needs to be stored somewhere...probably in a database.

Re: using array in php

during a run time it creat an array to do the job

Re: using array in php can put anything into an array at run time.  But where are
you storing how many points each user has?  When you update how many
points a user has, where are you recording that?

Re: using array in php

during run time te system take the points from the database and
caculate them then store them in array and sort them

Re: using array in php

So if they're already in the database, why not just sort them there?

Re: using array in php

it is not just sort i take the data from the database and use these
data to calculate points first i have to count the odds then points

it cant be from the database

Re: using array in php

On Mon, 11 Jul 2005 07:12:06 -0700, I_love_php wrote:

Quoted text here. Click to load it

Well, if not an array, what else are you going to use?  If there are a
million users then there might be a problem no matter what you use.

Your question is a bit too nebulous to answer, frankly.  Do you have more
specific details?

    JDS | jeffrey@example.invalid

Site Timeline