Performances improved : replacing the useless LEFT JOIN by INNER JOIN

git-svn-id: http://piwigo.org/svn/branches/release-1_3@301 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub
2004-01-19 21:18:34 +00:00
parent b81a4dbc62
commit 982bc009b6
3 changed files with 14 additions and 10 deletions
+2 -2
View File
@@ -494,7 +494,7 @@ function initialize_category( $calling_page = 'category' )
$query = 'SELECT COUNT(DISTINCT(id)) AS nb_total_images';
$query.= ' FROM '.PREFIX_TABLE.'images';
$query.= ' LEFT JOIN '.PREFIX_TABLE.'image_category AS ic';
$query.= ' INNER JOIN '.PREFIX_TABLE.'image_category AS ic';
$query.= ' ON id = ic.image_id';
$query.= $page['where'];
$query.= ';';
@@ -528,7 +528,7 @@ function initialize_category( $calling_page = 'category' )
$query = 'SELECT COUNT(DISTINCT(id)) AS nb_total_images';
$query.= ' FROM '.PREFIX_TABLE.'images';
$query.= ' LEFT JOIN '.PREFIX_TABLE.'image_category AS ic';
$query.= ' INNER JOIN '.PREFIX_TABLE.'image_category AS ic';
$query.= ' ON id = ic.image_id';
$query.= $page['where'];
$query.= ';';