irshalfir

Cart count error

Nov 23rd, 2020 (edited)
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 7.80 KB | None | 0 0
  1. {
  2.     "title": "mysqli_sql_exception",
  3.     "type": "mysqli_sql_exception",
  4.     "code": 500,
  5.     "message": "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\nGROUP BY `b`.`goods_created_by`' at line 6",
  6.     "file": "/var/www/html/opoapi/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php",
  7.     "line": 331,
  8.     "trace": [
  9.         {
  10.             "file": "/var/www/html/opoapi/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php",
  11.             "line": 331,
  12.             "function": "query",
  13.             "class": "mysqli",
  14.             "type": "->",
  15.             "args": [
  16.                 "SELECT IFNULL(sum(a.cart_count*b.goods_price), 0) as price, IFNULL(sum(a.cart_count*CEIL((b.goods_price*(b.goods_discount/100)))), 0) as discount, (select shipping_fee from adm000_options) as shipping_fee, IFNULL(sum(a.cart_count), 0) as count, IFNULL(sum(a.cart_count*(b.goods_price-CEIL((b.goods_price*(b.goods_discount/100)))))+(select shipping_fee from adm000_options), 0) as subtotal\nFROM `usr001_cart` `a`\nLEFT JOIN `adm003_goods` `b` ON `a`.`goods_id` = `b`.`goods_id`\nWHERE `a`.`user_id` IS NULL\nAND `a`.`cart_stat` = '2'\nAND `b`.`goods_created_by` = (select goods_created_by from adm003_goods where goods_id=)\nGROUP BY `b`.`goods_created_by`"
  17.             ]
  18.         },
  19.         {
  20.             "file": "/var/www/html/opoapi/vendor/codeigniter4/framework/system/Database/BaseConnection.php",
  21.             "line": 741,
  22.             "function": "execute",
  23.             "class": "CodeIgniter\\Database\\MySQLi\\Connection",
  24.             "type": "->",
  25.             "args": [
  26.                 "SELECT IFNULL(sum(a.cart_count*b.goods_price), 0) as price, IFNULL(sum(a.cart_count*CEIL((b.goods_price*(b.goods_discount/100)))), 0) as discount, (select shipping_fee from adm000_options) as shipping_fee, IFNULL(sum(a.cart_count), 0) as count, IFNULL(sum(a.cart_count*(b.goods_price-CEIL((b.goods_price*(b.goods_discount/100)))))+(select shipping_fee from adm000_options), 0) as subtotal\nFROM `usr001_cart` `a`\nLEFT JOIN `adm003_goods` `b` ON `a`.`goods_id` = `b`.`goods_id`\nWHERE `a`.`user_id` IS NULL\nAND `a`.`cart_stat` = '2'\nAND `b`.`goods_created_by` = (select goods_created_by from adm003_goods where goods_id=)\nGROUP BY `b`.`goods_created_by`"
  27.             ]
  28.         },
  29.         {
  30.             "file": "/var/www/html/opoapi/vendor/codeigniter4/framework/system/Database/BaseConnection.php",
  31.             "line": 669,
  32.             "function": "simpleQuery",
  33.             "class": "CodeIgniter\\Database\\BaseConnection",
  34.             "type": "->",
  35.             "args": [
  36.                 "SELECT IFNULL(sum(a.cart_count*b.goods_price), 0) as price, IFNULL(sum(a.cart_count*CEIL((b.goods_price*(b.goods_discount/100)))), 0) as discount, (select shipping_fee from adm000_options) as shipping_fee, IFNULL(sum(a.cart_count), 0) as count, IFNULL(sum(a.cart_count*(b.goods_price-CEIL((b.goods_price*(b.goods_discount/100)))))+(select shipping_fee from adm000_options), 0) as subtotal\nFROM `usr001_cart` `a`\nLEFT JOIN `adm003_goods` `b` ON `a`.`goods_id` = `b`.`goods_id`\nWHERE `a`.`user_id` IS NULL\nAND `a`.`cart_stat` = '2'\nAND `b`.`goods_created_by` = (select goods_created_by from adm003_goods where goods_id=)\nGROUP BY `b`.`goods_created_by`"
  37.             ]
  38.         },
  39.         {
  40.             "file": "/var/www/html/opoapi/vendor/codeigniter4/framework/system/Database/BaseBuilder.php",
  41.             "line": 1860,
  42.             "function": "query",
  43.             "class": "CodeIgniter\\Database\\BaseConnection",
  44.             "type": "->",
  45.             "args": [
  46.                 "SELECT IFNULL(sum(a.cart_count*b.goods_price), 0) as price, IFNULL(sum(a.cart_count*CEIL((b.goods_price*(b.goods_discount/100)))), 0) as discount, (select shipping_fee from adm000_options) as shipping_fee, IFNULL(sum(a.cart_count), 0) as count, IFNULL(sum(a.cart_count*(b.goods_price-CEIL((b.goods_price*(b.goods_discount/100)))))+(select shipping_fee from adm000_options), 0) as subtotal\nFROM `usr001_cart` `a`\nLEFT JOIN `adm003_goods` `b` ON `a`.`goods_id` = `b`.`goods_id`\nWHERE `a`.`user_id` IS NULL\nAND `a`.`cart_stat` = :a.cart_stat:\nAND `b`.`goods_created_by` = (select goods_created_by from adm003_goods where goods_id=)\nGROUP BY `b`.`goods_created_by`",
  47.                 {
  48.                     "a.cart_stat": [
  49.                         "2",
  50.                         true
  51.                     ]
  52.                 },
  53.                 false
  54.             ]
  55.         },
  56.         {
  57.             "file": "/var/www/html/opoapi/app/Models/CartModel.php",
  58.             "line": 399,
  59.             "function": "get",
  60.             "class": "CodeIgniter\\Database\\BaseBuilder",
  61.             "type": "->",
  62.             "args": []
  63.         },
  64.         {
  65.             "file": "/var/www/html/opoapi/app/Controllers/Api/CartController.php",
  66.             "line": 114,
  67.             "function": "sumStatCheckASeller",
  68.             "class": "App\\Models\\CartModel",
  69.             "type": "->",
  70.             "args": [
  71.                 null,
  72.                 null
  73.             ]
  74.         },
  75.         {
  76.             "file": "/var/www/html/opoapi/vendor/codeigniter4/framework/system/CodeIgniter.php",
  77.             "line": 918,
  78.             "function": "countUpdate",
  79.             "class": "App\\Controllers\\Api\\CartController",
  80.             "type": "->",
  81.             "args": [
  82.                 "1"
  83.             ]
  84.         },
  85.         {
  86.             "file": "/var/www/html/opoapi/vendor/codeigniter4/framework/system/CodeIgniter.php",
  87.             "line": 404,
  88.             "function": "runController",
  89.             "class": "CodeIgniter\\CodeIgniter",
  90.             "type": "->",
  91.             "args": [
  92.                 {
  93.                     "cart": {
  94.                         "pager": null
  95.                     },
  96.                     "cvm": {
  97.                         "pager": null
  98.                     }
  99.                 }
  100.             ]
  101.         },
  102.         {
  103.             "file": "/var/www/html/opoapi/vendor/codeigniter4/framework/system/CodeIgniter.php",
  104.             "line": 312,
  105.             "function": "handleRequest",
  106.             "class": "CodeIgniter\\CodeIgniter",
  107.             "type": "->",
  108.             "args": [
  109.                 null,
  110.                 {
  111.                     "handler": "file",
  112.                     "backupHandler": "dummy",
  113.                     "storePath": "/var/www/html/opoapi/writable/cache/",
  114.                     "cacheQueryString": false,
  115.                     "prefix": "",
  116.                     "memcached": {
  117.                         "host": "127.0.0.1",
  118.                         "port": 11211,
  119.                         "weight": 1,
  120.                         "raw": false
  121.                     },
  122.                     "redis": {
  123.                         "host": "127.0.0.1",
  124.                         "password": null,
  125.                         "port": 6379,
  126.                         "timeout": 0,
  127.                         "database": 0
  128.                     },
  129.                     "validHandlers": {
  130.                         "dummy": "CodeIgniter\\Cache\\Handlers\\DummyHandler",
  131.                         "file": "CodeIgniter\\Cache\\Handlers\\FileHandler",
  132.                         "memcached": "CodeIgniter\\Cache\\Handlers\\MemcachedHandler",
  133.                         "predis": "CodeIgniter\\Cache\\Handlers\\PredisHandler",
  134.                         "redis": "CodeIgniter\\Cache\\Handlers\\RedisHandler",
  135.                         "wincache": "CodeIgniter\\Cache\\Handlers\\WincacheHandler"
  136.                     }
  137.                 },
  138.                 false
  139.             ]
  140.         },
  141.         {
  142.             "file": "/var/www/html/opoapi/public/index.php",
  143.             "line": 52,
  144.             "function": "run",
  145.             "class": "CodeIgniter\\CodeIgniter",
  146.             "type": "->",
  147.             "args": []
  148.         }
  149.     ]
  150. }
Add Comment
Please, Sign In to add comment