我想获得.slick-test .slick-track {
background: none !important;
}
.slick-test .slick-slide {
background-color: #556677 !important;
margin-right: 5px;
padding: 3px;
}
和我在SUM
表中保存的购物车产品的特定客户的id
产品价格。价格在cart
表中。
表格结构如下:
products
我该怎么做?我使用的是以下CART TABLE cart_id, customer_id, product_id, product_qty PRODUCTS TABLE product_id, product_cat, product_title, product_desc, product_price, product_img
和mysqli
代码,但它返回php
:
NUll
答案 0 :(得分:1)
你不是指更多的东西:
"SELECT SUM(`product_price`) as total
FROM cart
INNER JOIN product ON product.id = cart.product_id
WHERE cart.customer_id = '$c_id'";
很难说,因为我们不知道你的数据库结构,但是像你一样加入表似乎毫无意义
更新:知道数据库结构后更改了查询