duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/addons/duncanmcclean/simple-commerce
Other
146 stars 40 forks source link

[5.x] Fix "Top Customers" query when storing users in a database #977

Closed duncanmcclean closed 8 months ago

duncanmcclean commented 8 months ago

This pull request attempts to fix an issue where the query for the "Top Customers" widget on the Overview sometimes caused a database error, depending on the version of MySQL you have installed.

To resolve the issue for those using MySQL, I've adjusted the query to use the JSON_LENGTH function instead. However, since SQLite doesn't support this function, it'll continue to use the working JSON_ARRAY_LENGTH function.

Fixes #906.

github-actions[bot] commented 8 months ago

Released as part of v5.9.2.