Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have this error when I save the view:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_data_field_amount.uid' in 'field list'
and does not print the SUM of fields.
Any idea?
thanks...
Comments
Comment #1
sashkernel CreditAttribution: sashkernel commentedI encountered similar bug when trying to do sum of one column.
This module would be the most perfect fit to my table views if I manage to make it work.
Comment #2
KarenS CreditAttribution: KarenS commentedThis part of the code should be working now.
Comment #3
sashkernel CreditAttribution: sashkernel commentedThank you Karen
I'll test at first available opportunity
Comment #5
jenyum CreditAttribution: jenyum commentedI am experiencing this error right now with the latest release, which appears to be newer than the dev release? Is there another release that I should be seeing?
Comment #6
jenyum CreditAttribution: jenyum commentedchanging status back to active. Tried dev version and can confirm that both latest recommended release and dev produce the error in #1 with integer fields.
Comment #7
gmgallag CreditAttribution: gmgallag commentedWas there any solution to this. Currently experiencing the same error:
SQLSTATE[42000]: Syntax error or access violation: 1064 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 ') AS sum__views_php_2 FROM dr_uc_orders uc_orders LEFT JOIN dr_users users ON u' at line 1
Note that I am trying to sum a column populated via Views PHP - not sure if this matters.
Comment #8
ibuildit CreditAttribution: ibuildit commentedThis happens only when the EDIT FIELD is in the view.
Comment #9
windmaomao CreditAttribution: windmaomao commentedI confirmed as stated by #8, remove edit field and it works.
Comment #10
snowfly CreditAttribution: snowfly commentedHi what do you mean by EDIT FIELD can you please point me out.
Comment #11
ibuildit CreditAttribution: ibuildit commentedthe field you add if you want an edit link to edit the content from the view
Comment #12
asiby CreditAttribution: asiby commentedI do not have the EDIT LINK in my view and I am having the same issue.
Comment #13
Mark Schneider CreditAttribution: Mark Schneider commentedI have this error message:
SQLSTATE[42000]: Syntax error or access violation: 1064 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 ') AS sum__views_php_2, SUM(field_data_field_cvt_count.field_cvt_count_value) AS ' at line 1
Note that I am trying to sum a column populated via Views PHP - not sure if this matters.
It's a little bit like the message in #7.
I don't understand the comment in #8.
Any ideas?
Comment #14
higherform CreditAttribution: higherform commentedI can confirm that the presence of the "edit link" field can turn the error message in reply #1 on and off in my install. Using Views_calc-7.x-1.1 and views 7.11. The error does not appear in a different drupal install with only views 7.11 (not views_calc) with an edit link field.
Comment #15
apoc1 CreditAttribution: apoc1 commentedI can also confirm this. Both edit en delete views fields cause this error. Using a new install drupal 7.41 with Calc 7.x-1.1 Anyone ever found a solution to this?
Comment #16
gintass CreditAttribution: gintass commentedI can confirm that adding "Edit" links generates the "SQLSTATE[42000]" errors and calculation is not working (it displays zero). Also if I have a "clone" field enabled (provided by Node Clone module), the error is not generated but clone links are not being displayed.