https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/

Cannot display view count

  • cjmicro
  • cjmicro's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #3514

My Table View called "votes" has a "count"

SELECT `FieldValue`, count(*)
FROM `ottb5_rsform_submission_values` WHERE `FieldName`='vote'
GROUP BY `FieldValue` ORDER BY count(*) DESC;

Displays in PHPmyAdmin fine, but when i create a tools jx grid, it will not let me display the count(*) column This is the key piece I need, how can i get it to work?
Thank you.

Last edit: 7 years 6 months ago by cjmicro.

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #3516

Hi,

try giving count(*) a name. And do not use order in view definition. You can handle order by later on at select (with Table JX)

SELECT `FieldValue`, count(*) as CountValue
FROM `ottb5_rsform_submission_values` WHERE `FieldName`='vote'
GROUP BY `FieldValue`

The following user(s) said Thank You: cjmicro

Please Log in or Create an account to join the conversation.

  • cjmicro
  • cjmicro's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 6 months ago #3518

This is all working now, thanks!!

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.185 seconds

Contact Us

Contact us on Discord

Contact us on Facebook