commit | author | age
|
e2b48d
|
1 |
<?php |
B |
2 |
|
|
3 |
/** |
|
4 |
* 删除收藏商品列表 |
|
5 |
*/ |
|
6 |
define('IN_ECS', true); |
|
7 |
require('includes/init.php'); |
|
8 |
$uid = isset($_REQUEST['uid']) ? intval($_REQUEST['uid']) : 0; |
|
9 |
$goods_id = isset($_REQUEST['goods_id']) ? intval($_REQUEST['goods_id']) : 0; |
|
10 |
$sql="DELETE FROM ".$ecs->table('collect_goods')." WHERE user_id='$uid' AND goods_id='$goods_id' "; |
|
11 |
$res=$db -> query($sql); |
|
12 |
$result=array(); |
|
13 |
if($res){ |
|
14 |
$result['code']="1"; |
|
15 |
$result['info']="删除成功!"; |
|
16 |
}else{ |
|
17 |
$result['code']="0"; |
|
18 |
$result['info']="删除失败!"; |
|
19 |
} |
|
20 |
|
|
21 |
print_r(json_encode($result)); |
|
22 |
|
|
23 |
|
|
24 |
?> |