On Fri, Jan 28, 2011 at 00:33, Ethan Rosenberg wrote:
>
> Please take a look at php.ini in the vicinity of line 510. You will see the
> construct to which I refer. Can you explain what is going on? I do not
> think it is a problem with commenting out a line.
>
> Any ideas from the rest of the l
OK, so it's a Friday hence a random debate
What is preferred for class methods?
class foo
{
static public function bar(){}
public static function wibble(){}
}
??
All methods are valid, but are some more valid than others? :p
Checking ZF:
[colin@jimmy Zend (working)]$ cgrep "public sta
I personally like scope static fucntion. Coming from C# it just makes
more sense to me.
JF.
On 28/01/2011 12:15, Colin Guthrie wrote:
OK, so it's a Friday hence a random debate
What is preferred for class methods?
class foo
{
static public function bar(){}
public static function w
How did you created the table? Can you count the Id's only? Wouldn't
this just count the entries in the index?
On 28/01/2011 12:57, AmirBehzad Eslami wrote:
Dear list,
The common solution for counting online users is to store sessions in a Table.
I've created a Table in MySQL to acheive the
On 1/28/2011 9:57 AM, AmirBehzad Eslami wrote:
> Dear list,
>
> The common solution for counting online users is to store sessions in a Table.
> I've created a Table in MySQL to acheive the result, but it seems this
> solution
> is a little heavy for such a simple task.
>
> Is there a better alt
Marc Guay wrote:
1.) Saving strings to a database
One thing I always forget to remember is to send tge "SET NAMES utf8"
command to MySQL after making a connection. This will save you 1000
headaches if you're working with non-latin characters. I can't count
the number of times I've thrown html
Having learned java before even knowing what php was (yeah I'm a noob in
both) I prefer scope static function.
On Fri, Jan 28, 2011 at 12:20 PM, Fernando wrote:
> I personally like scope static fucntion. Coming from C# it just makes more
> sense to me.
>
> JF.
>
>
> On 28/01/2011 12:15, Colin G
On Fri, Jan 28, 2011 at 10:35 AM, Mujtaba Arshad wrote:
> Having learned java before even knowing what php was (yeah I'm a noob in
> both) I prefer scope static function.
I learned Java first, too, and also prefer the scope first. I place a scope
on every method, so I'd rather the first word alw
Jim, I'm already using the solution you mentioned.
The problem is about the performance.
One solution is to increase the performance by using Memcached.
But counting online users always requires a __new__fresh__ COUNT(*) query, even
under Memcahched. Since the COUNT(*) result is very dynamic and
If you're using memcached already you could store the number in it and
update it only when a user logs in/out. If no one is logging in/out, the
number isn't changing.
If your site is so popular that hundreds of users are logging in every
second you might want to change the logic so that the proces
> I'm looking for a faster way to count online users. COUNT(*) is time
> consuming under MySQL.
If COUNTing is the heavy part, why not create a 'users_logged_in'
field somewhere and increment it when someone logs in and decrement it
when someone logs out? Then your query is just a straight SELEC
On Fri, Jan 28, 2011 at 11:03 AM, Marc Guay wrote:
> If COUNTing is the heavy part, why not create a 'users_logged_in'
> field somewhere and increment it when someone logs in and decrement it
> when someone logs out? Then your query is just a straight SELECT.
If this is like most web sites, us
On 1/28/2011 11:23 AM, David Harkness wrote:
> On Fri, Jan 28, 2011 at 11:03 AM, Marc Guay wrote:
>
>> If COUNTing is the heavy part, why not create a 'users_logged_in'
>> field somewhere and increment it when someone logs in and decrement it
>> when someone logs out? Then your query is just a s
13 matches
Mail list logo