diff options
| author | Greg Roach <fisharebest@gmail.com> | 2013-08-25 12:00:20 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2013-08-25 12:00:20 +0100 |
| commit | 169b2a4a5b20481e32e9239eceacab525192638c (patch) | |
| tree | 3ce96818643ad9780e86177927f6980ff27f90e7 /library/WT/Stats.php | |
| parent | 3de56c0ee5e7d0b74e10645c887f319cda363ee5 (diff) | |
| download | webtrees-169b2a4a5b20481e32e9239eceacab525192638c.tar.gz webtrees-169b2a4a5b20481e32e9239eceacab525192638c.tar.bz2 webtrees-169b2a4a5b20481e32e9239eceacab525192638c.zip | |
Typo - wrong column name
Diffstat (limited to 'library/WT/Stats.php')
| -rw-r--r-- | library/WT/Stats.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/library/WT/Stats.php b/library/WT/Stats.php index 6e0cfaf67a..aa1516f388 100644 --- a/library/WT/Stats.php +++ b/library/WT/Stats.php @@ -2840,7 +2840,7 @@ class WT_Stats { $rows=self::_runSQL( " SELECT SQL_CACHE ROUND(AVG(f_numchil),2) AS num, FLOOR(d_year/100+1) AS century". " FROM `##families`". - " JOIN `##dates` ON (d_file = f_file AND d_gid=f_gid)". + " JOIN `##dates` ON (d_file = f_file AND d_gid=f_id)". " WHERE f_file = {$this->_ged_id}". " AND d_julianday1<>0". " AND d_fact = 'MARR'". @@ -2917,19 +2917,18 @@ class WT_Stats { function topAgeBetweenSiblingsFullName($params=null) { return $this->_ageBetweenSiblingsQuery($type='nolist', $params=null); } function topAgeBetweenSiblingsList ($params=null) { return $this->_ageBetweenSiblingsQuery($type='list', $params=null); } - function noChildrenFamilies() { + function _noChildrenFamilies() { $rows=self::_runSQL( - " SELECT SQL_CACHE". - " COUNT(*) AS tot". - " FROM". - " `##families` AS fam". - " WHERE". - " f_numchil = 0 AND". - " fam.f_file = {$this->_ged_id}"); + " SELECT SQL_CACHE COUNT(*) AS tot". + " FROM `##families`". + " WHERE f_numchil = 0 AND f_file = {$this->_ged_id}"); $row=$rows[0]; return WT_I18N::number($row['tot']); } + function noChildrenFamilies() { + return WT_I18N::number($this->_noChildrenFamilies()); + } function noChildrenFamiliesList($params = null) { global $TEXT_DIRECTION; @@ -2997,7 +2996,7 @@ class WT_Stats { if ($max<$values['count']) $max = $values['count']; $tot += $values['count']; } - $unknown = $this->noChildrenFamilies()-$tot; + $unknown = $this->_noChildrenFamilies()-$tot; if ($unknown>$max) $max=$unknown; $chm = ""; $chxl = "0:|"; |
