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

Cannot display view count

  • cjmicro
  • cjmicro's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 3 weeks 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: 8 years 2 weeks ago by cjmicro.

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

More
8 years 2 weeks 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
8 years 2 weeks 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.137 seconds

Contact Us

Contact us on Discord

Contact us on Facebook