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
SELECT id, date, type as type, libelle as libelle, TRUNCATE(debit, 2) as debit, TRUNCATE(credit, 2) as credit, ROUND(COALESCE(credit, 0) - COALESCE(debit, 0), 2) as solde FROM compte_cp
Is it intended that the truncate/round end up in their own category ? :
I'm editing the where part using the parser, and this makes it problematic because after I make changes to the parsed Array (the one in the picture) and use the Creator, it doesn't include the TRUNCATE part anymore. Instead the creator generates the following:
SELECT id, date, type as type, libelle as libelle, FROM compte_cp
Notice the last comma before FROM.
Either way thank you for this amazing tool !
Edit: I completely forgot that you can write TRUNCATE as the first Keyword of the query (Like SELECT, UPDATE, etc), but also as a function (which is what I do in this case). That seems to be the issue. Not sure if it could be fixed.
The text was updated successfully, but these errors were encountered:
Herz3h
added a commit
to Herz3h/PHP-SQL-Parser
that referenced
this issue
May 28, 2021
Consider this query:
Is it intended that the truncate/round end up in their own category ? :
I'm editing the where part using the parser, and this makes it problematic because after I make changes to the parsed Array (the one in the picture) and use the Creator, it doesn't include the TRUNCATE part anymore. Instead the creator generates the following:
Notice the last comma before FROM.
Either way thank you for this amazing tool !
Edit: I completely forgot that you can write TRUNCATE as the first Keyword of the query (Like SELECT, UPDATE, etc), but also as a function (which is what I do in this case). That seems to be the issue. Not sure if it could be fixed.
The text was updated successfully, but these errors were encountered: