File: includes/db_pager.inc

// parse the query

                $parts = preg_split('/\sFROM\s/si', $sql, 2);
                    if (count($parts) == 2) {
                        $this->select = $parts[0];
                        $sql = $parts[1];
                    } else {
                        if ($SysPrefs->go_debug)
                            display_error("Invalid sql input for db_pager");
                    }

// fixed

                               $parts = preg_split('/\sFROM\s/si', $sql, 2);
                    if (count($parts) == 2) {
                        $this->select = $parts[0];
                        $this->from = $parts[1];
                        $sql = $parts[1];
                        
                    } else {
                        if ($SysPrefs->go_debug)
                            display_error("Invalid sql input for db_pager");
                    }