Optimization - functions.php
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GPG Contact Form |
Fix Committed
|
High
|
Unassigned |
Bug Description
I Just thought I would point out you can do all of the below that is commented out with a single query. It is not a great idea to do more quries then are nessary because it adds load to the db server(or local host) and running quries require a request to be made to an external application.
I have added a fix this. see below.
## User Settings
/*
$query12 = mysql_query("SELECT username FROM user");
$username = mysql_result(
$query13 = mysql_query("SELECT password FROM user");
$password = mysql_result(
$query14 = mysql_query("SELECT lastlogin FROM user");
$lastlogin = mysql_result(
$query15 = mysql_query("SELECT lastip FROM user");
$lastip = mysql_result(
*/
//The above was replaced by one single query. Less load on the server.
$query_user = mysql_query("SELECT password,
$result_user= mysql_fetch_
$username =$result_
$password =$result_
$lastlogin=
$lastip =$result_
Thanks for reporting this, drubin.
I have fixed the bug, and pushed the fix up to the development branch.