mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
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:
@@ -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.= ';';
|
||||
|
||||
Reference in New Issue
Block a user