[英]Drupal Shopping cart sql error
Keep getting an error within the drupal log and do not under stand why. 在drupal日志中不断出现错误,不要理解为什么。 Can someone help me out?
有人可以帮我吗? FYI I have a shopping cart on the website.
仅供参考,我在网站上有一个购物车。 Pipettes.com.
Pipettes.com。 I've also attached a screenshot
我还附上了截图
Any help is appreciated. 任何帮助表示赞赏。 Thanks!
谢谢!
Message error 讯息错误
You have an error in your SQL syntax;
您的SQL语法有误; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7 query: SELECT
id
,price
FROM wb_uc_cart_items WHEREcart_id
= '00df18eef923efe7bc180f0307e713e4' ANDsnid
= 31469 ANDstatus
= 'new' ANDdiscounted
= 'yes' ORDER BYprice
ASC LIMIT in /mnt/ebs/apache2/vhosts/pipettes.com/html/sites/all/modules/indigo_import/indigo_import.module on line 623.在第7行查询中,检查与您的MySQL服务器版本对应的手册以在''附近使用正确的语法:SELECT
id
,price
FROM wb_uc_cart_items WHEREcart_id
='00df18eef923efe7bc180f0307e713e4'ANDsnid
= 31469 ANDstatus
='snid
discounted
='是的,在623行上的/mnt/ebs/apache2/vhosts/pipettes.com/html/sites/all/modules/indigo_import/indigo_import.module中按price
ASC限制。
indigo_import.module on line 623 第623行的indigo_import.module
621 $sql_updates = array();
622
623 $result = db_query($sql);
624 while ($row = db_fetch_object($result)) {
625
626 $sql_updates[] = "UPDATE {wb_uc_cart_items}
627 SET `status` = 'd'
628 WHERE `id` = " . $row->id . " AND `discounted` = 'yes' AND `status` = 'new' LIMIT $s_discount_qty;";
629 $dx++;
630
631 if($snode->field_discounted_prices[0]['value']) {
632 $this_total_discount += ($row->price - $snode->field_discounted_prices[0]['value']);
633 } elseif($snode->field_discounted_percentage[0]['value']) {
634 $this_total_discount += (($snode->field_discounted_percentage[0]['value'] / 100) * $row->price);
635 }
636
637 }
What's the value of $s_discount_qty? $ s_discount_qty的值是多少? It appears that the SQL statement in your log has a LIMIT clause without a following value.
您的日志中的SQL语句似乎具有LIMIT子句,但没有以下值。 Are you able to execute the SQL statement via the mysql command line interface?
您是否可以通过mysql命令行界面执行SQL语句? IE: is it valid?
IE:有效吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.