mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
fixes #1871 move the retrieve of the number of queried rows
The FOUND_ROWS() must be performed right after the SQL_CALC_FOUND_ROWS but commit 4d81d28eca
had added some new SQL queries in between.
This commit is contained in:
parent
55610206ee
commit
b9ddcf17f1
1 changed files with 2 additions and 2 deletions
|
@ -116,6 +116,8 @@ SELECT SQL_CALC_FOUND_ROWS i.*
|
|||
$images[] = $image;
|
||||
}
|
||||
|
||||
list($total_images) = pwg_db_fetch_row(pwg_query('SELECT FOUND_ROWS()'));
|
||||
|
||||
// let's take care of adding the related albums to each photo
|
||||
if (count($image_ids) > 0)
|
||||
{
|
||||
|
@ -189,8 +191,6 @@ SELECT
|
|||
}
|
||||
}
|
||||
|
||||
list($total_images) = pwg_db_fetch_row(pwg_query('SELECT FOUND_ROWS()'));
|
||||
|
||||
return array(
|
||||
'paging' => new PwgNamedStruct(
|
||||
array(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue