From 982bc009b6879ea78d0fd1eec6469c713be2f1dc Mon Sep 17 00:00:00 2001 From: z0rglub Date: Mon, 19 Jan 2004 21:18:34 +0000 Subject: 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 --- admin/infos_images.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'admin') diff --git a/admin/infos_images.php b/admin/infos_images.php index 59c1126c9..b9d868509 100644 --- a/admin/infos_images.php +++ b/admin/infos_images.php @@ -49,7 +49,7 @@ if ( isset( $page['cat'] ) ) $query = 'SELECT id,file'; $query.= ' FROM '.PREFIX_TABLE.'images'; - $query.= ' LEFT JOIN '.PREFIX_TABLE.'image_category ON id = image_id'; + $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category ON id = image_id'; $query.= ' WHERE category_id = '.$page['cat']; $query.= ';'; $result = mysql_query( $query ); @@ -176,7 +176,7 @@ if ( isset( $page['cat'] ) ) { $query = 'SELECT id,keywords'; $query.= ' FROM '.PREFIX_TABLE.'images'; - $query.= ' LEFT JOIN '.PREFIX_TABLE.'image_category ON id = image_id'; + $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category ON id = image_id'; $query.= ' WHERE category_id = '.$page['cat']; $query.= ';'; $result = mysql_query( $query ); @@ -279,7 +279,7 @@ if ( count( $errors ) != 0 ) $query = 'SELECT id,file,comment,author,tn_ext,name,date_creation,keywords'; $query.= ',storage_category_id,category_id'; $query.= ' FROM '.PREFIX_TABLE.'images'; - $query.= ' LEFT JOIN '.PREFIX_TABLE.'image_category ON id = image_id'; + $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category ON id = image_id'; $query.= ' WHERE category_id = '.$page['cat']; $query.= $conf['order_by']; $query.= ' LIMIT '.$page['start'].','.$page['nb_image_page']; -- cgit v1.2.3