Query:
SELECT SUM(ProductCost) FROM `tblBasket` GROUP BY ProductCode HAVING BasketSessionID = '3429782d79c68834ea698bb4116eef5e'
Error display like:
1054 - Unknown column 'BasketSessionID' in 'having clause'
What is the error in my request?
Try using the where clause instead of the having clause:
SELECT SUM(ProductCost) FROM `tblBasket` WHERE BasketSessionID ='3429782d79c68834ea698bb4116eef5e' GROUP BY ProductCode
I think you want to use a where clause that does not have.
HAVING filters the units. You should try GROUP BY.
Source: https://habr.com/ru/post/1772516/More articles:Data template for two counters that are grouped together - c #VS2010 Chart control: decreasing the Y axis field - asp.netHow to get effective permissions for a user in an AD LDS record in C #? - c #The quick string is replaced by a wildcard - stringС++: чтение из файла с нулевыми символами - c++reading large command output using clojure - clojureIs it faster to allow PHP to parse a large file than calling data from a MySQL database? - performanceDoes AVAssetReader not read the entire file? - iosHow to get file name and line number in Perl? - perlIs it possible to implement a vertical scrollbar in a drop-down menu using only CSS? - javascriptAll Articles