I tried the dev version and it works fine with other node types also. Results are great! Even if I use a relationship, there is no problem.

I noticed that when I add a pager, it gives an SQL warning like:

* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) LIMIT 0, 10' at line 10 query: SELECT SUM(superlig_week_stats.correct_guesses) AS superlig_week_stats_correct_guesses, MAX('SUM') AS TOTAL_SUM, SUM(superlig_week_stats.point) AS superlig_week_stats_point, SUM(superlig_week_stats.total_guesses) AS superlig_week_stats_total_guesses, MAX('') AS superlig_hafta_superlig_week_stats_name, MAX('') AS users_name FROM users users LEFT JOIN superlig_week_stats superlig_week_stats ON users.uid = superlig_week_stats.uid LEFT JOIN superlig_hafta superlig_hafta_superlig_week_stats ON superlig_week_stats.hid = superlig_hafta_superlig_week_stats.hid WHERE (users.uid = 1) AND (node.nid IN (,)) LIMIT 0, 10 in /home3/fehmican/public_html/superlig/sites/all/modules/views/includes/view.inc on line 755.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) LIMIT 0, 10' at line 10 query: SELECT AVG(superlig_week_stats.correct_guesses) AS superlig_week_stats_correct_guesses, MAX('AVG') AS TOTAL_AVG, AVG(superlig_week_stats.point) AS superlig_week_stats_point, AVG(superlig_week_stats.total_guesses) AS superlig_week_stats_total_guesses, MAX('') AS superlig_hafta_superlig_week_stats_name, MAX('') AS users_name FROM users users LEFT JOIN superlig_week_stats superlig_week_stats ON users.uid = superlig_week_stats.uid LEFT JOIN superlig_hafta superlig_hafta_superlig_week_stats ON superlig_week_stats.hid = superlig_hafta_superlig_week_stats.hid WHERE (users.uid = 1) AND (node.nid IN (,)) LIMIT 0, 10 in /home3/fehmican/public_html/superlig/sites/all/modules/views/includes/view.inc on line 755.

Of course it is a little bit tricky to use a pager and calculate the results. It may not be necessary most of the time. But maybe someone may need the results of all rows or results of the rows that are currently displayed.

Thank you,

Sinan

Comments

jschulz-1’s picture

Just to add more documentation to this issue, I am seeing the same behavior when adding the Pager. Here's my MySQL error:

# user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,,,,,)) ORDER BY users_login_minute DESC LIMIT 0, 10' at line 16 query: SELECT MAX('') AS profile_values_profile_age_value, MAX('COUNT') AS TOTAL_COUNT, MAX('') AS profile_values_profile_gender_value, MAX('') AS profile_values_profile_hometown_value, MAX('') AS profile_values_profile_email_alerts_value, MAX('') AS users_created, MAX('') AS users_mail, COUNT(users.name) AS users_name, MAX('') AS users_login FROM users users LEFT JOIN users_roles users_roles ON users.uid = users_roles.uid AND users_roles.rid = 3 LEFT JOIN profile_values profile_values_profile_age ON users.uid = profile_values_profile_age.uid AND profile_values_profile_age.fid = '1' LEFT JOIN profile_values profile_values_profile_gender ON users.uid = profile_values_profile_gender.uid AND profile_values_profile_gender.fid = '4' LEFT JOIN profile_values profile_values_profile_hometown ON users.uid = profile_values_profile_hometown.uid AND profile_values_profile_hometown.fid = '2' LEFT JOIN profile_values profile_values_profile_email_alerts ON users.uid = profile_values_profile_email_alerts.uid AND profile_values_profile_email_alerts.fid = '3' WHERE (users_roles.rid IS NULL) AND (users.uid not in ('1')) AND (users.uid not in ('0')) AND (users.login > 1254252789-31536000) AND (node.nid IN (,,,,,,,,,)) ORDER BY users_login_minute DESC LIMIT 0, 10 in /Applications/MAMP/htdocs/usahockeymag/sites/all/modules/views/includes/view.inc on line 731.
# warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/usahockeymag/sites/all/modules/views_calc/theme.inc on line 180.

jasonabc’s picture

am getting this also

beifler’s picture

And I as well.

basvredeling’s picture

+1

Nicolas Georget’s picture

Same issue when i tried to use pager on the view "time_tracker_reports".

miro_dietiker’s picture

Status: Active » Fixed

This should work now.

Nicolas Georget’s picture

Status: Fixed » Active

There's no longer SQL errors but the pager does not show up.

miro_dietiker’s picture

Do you really have the latest version of e.g. views? (2.x)

Nicolas Georget’s picture

Modules Installed:

And after installed, i ran an update. Does it work for you ?

miro_dietiker’s picture

Views Calc somehow is not relationship clean. Can you please check if it also works without any?

To make us reproduce this we need
- The module you're using
- The configuration of the view (please upload an export)
- Criteria of test data entered

Then we can try to reproduce it.
Meanwhile - at least i have a working pager in node and term views - and our custom tables with view integration...
Try it also once with nodes.

Nicolas Georget’s picture

Status: Active » Fixed
StatusFileSize
new16.46 KB
new9.6 KB

Fixed because it comes from the view of the CaseTracker. I have just made a clean install of Drupal 6.20 with the minimal modules: CaseTracker, TimeTracker, views and viewsCalc. and it works.
Then, i tried on a copy of our Drupal database to revert the original view «time_tracker_reports»... And works again.
So for sure now it comes from the view code itself.
Here's below an export of each view: 1) The original view 2) The modified view
If i find out before you the "bug", i will post it right away.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.