Re: Code optimization

From: Date: Fri, 07 Aug 2009 06:27:48 +0000
Subject: Re: Code optimization
References: 1 2 3 4  Groups: php.db 
Request: Send a blank email to php-db+get-46426@lists.php.net to get a copy of this message
kranthi wrote:
you can avoid using mysql_connect and mysql_close for every query (they are the most costliest functions in your application)
You're assuming that. It could be the queries being run are the costliest.
you should not use mysql_result for this application http://in2.php.net/function.mysql-result try using mysql_fetch_assoc instead.
It works, it gives the right results - it's perfectly fine.
finally, use a good profiler, like xdebug to find the bottlenecks in your application.
That is a must, xdebug is very very useful. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#46426) next »