You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DB::table("products")
->select("*", "count (id) as count")
->get();
It has did not work for 2 issues:
First:
I had to add DB::raw for the count part
Second:
I got the issue Function Name Parsing and Resolution and solve it by removing the whitespaces between the name and the following ( parenthesis character
Final code:
DB::table("products")
->select("*", DB::raw("count(id) as count"))
->get();
The text was updated successfully, but these errors were encountered:
saif7amed
changed the title
Parsing sql with count issue
Parsing sql with COUNT
Sep 29, 2024
Hi and thanks for the awesome tool
I face issue parsing this query:
I got:
It has did not work for 2 issues:
First:
I had to add
DB::raw
for the count partSecond:
I got the issue Function Name Parsing and Resolution and solve it by removing the whitespaces between the name and the following ( parenthesis character
Final code:
The text was updated successfully, but these errors were encountered: