Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QueryException when accessing hub when using PostgreSQL #11

Closed
justtomisfine opened this issue Dec 24, 2021 · 3 comments
Closed

QueryException when accessing hub when using PostgreSQL #11

justtomisfine opened this issue Dec 24, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@justtomisfine
Copy link

justtomisfine commented Dec 24, 2021

Illuminate\Database\QueryException

SQLSTATE[42703]: Undefined column: 7 ERROR: column "count" does not exist LINE 1: ...null group by "store_order_addresses"."id" having "count" <=... ^ (SQL: select count(*) as aggregate from (select COUNT(*) count, "store_order_addresses"."contact_email" from "store_order_addresses" left join store_order_addresses address_join on "address_join"."contact_email" = "store_order_addresses"."contact_email" where "store_order_addresses"."type" = billing and "store_order_addresses"."created_at" between 2021-12-20 00:00:00 and 2021-12-26 00:00:00 and "store_order_addresses"."contact_email" is not null group by "store_order_addresses"."id" having "count" <= 1) as "temp_table")

https://github.com/getcandy/getcandy/blob/947c6b3bad9da199dd8da2aa858161af7b80f7e1/src/Http/Livewire/Dashboard.php#L90

This issue only occurs when using PostgreSQL. The error from #9 is given when using MariaDB.

@justtomisfine
Copy link
Author

Also, DATE_FORMAT only really exists in MySQL and is not in PostgreSQL.

@glennjacobs glennjacobs added the bug Something isn't working label Dec 24, 2021
@alecritson
Copy link
Collaborator

There is a PR for this on #12

@alecritson
Copy link
Collaborator

This should be resolved in 2.0-beta4 If it's still an issue please re open :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants