php-general Digest 28 Jan 2011 12:56:02 - Issue 7156
Topics (messages 311063 through 311065):
Re: Pear Problems
311063 by: Ethan Rosenberg
311065 by: Daniel Brown
Re: Cross-platform IDE
311064 by: Ross McKay
Administrivia:
To subscribe to the digest, e-mail:
On Fri, Jan 28, 2011 at 00:33, Ethan Rosenberg eth...@earthlink.net 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
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
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
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
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
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 ferna...@ggtours.ca wrote:
I personally like scope static fucntion. Coming from C# it just makes more
sense to me.
JF.
On 28/01/2011
On Fri, Jan 28, 2011 at 10:35 AM, Mujtaba Arshad mujtab...@gmail.comwrote:
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
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
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
On Fri, Jan 28, 2011 at 11:03 AM, Marc Guay marc.g...@gmail.com 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
On 1/28/2011 11:23 AM, David Harkness wrote:
On Fri, Jan 28, 2011 at 11:03 AM, Marc Guay marc.g...@gmail.com 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
14 matches
Mail list logo