Performance improvements to version and application classes. Reduce the amount of queries to
what is necessary during object creation. The only use of all but one of the arrays we were fetching during version and application construction was in ::delete() so we can just retrieve them there. Speed screenshot class up by only querying for necessary columns, not select *
This commit is contained in:
@@ -187,6 +187,16 @@ class Comment {
|
||||
return false;
|
||||
}
|
||||
|
||||
function get_comment_count_for_versionid($iVersionId)
|
||||
{
|
||||
$sQuery = "SELECT count(*) as cnt from appComments where versionId = '?'";
|
||||
$hResult = query_parameters($sQuery, $iVersionId);
|
||||
if(!$hResult) return 0;
|
||||
|
||||
$oRow = mysql_fetch_object($hResult);
|
||||
return $oRow->cnt;
|
||||
}
|
||||
|
||||
/**
|
||||
* class static functions
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user