我有选择查询问题?我无法获得SID
但是我可以WID
使用相同的查询获得?SID
不在页面上显示,但在页面WID
上显示
查询购物车 ID AS sid
function get_sid($id){
$result=mysql_query("SELECT shoppingcart.`id` AS sid FROM shoppingcart
INNER JOIN products ON shoppingcart.`pid`=products.`id`
WHERE products.id='$id'") or die("Shopping Card ID"."<br/><br/>".mysql_error());
$row=mysql_fetch_array($result);
return $row['sid'];
}
查询 MyWishlist ID AS wid
function get_size($id){
$result=mysql_query("SELECT mywishlist.id AS wid FROM mywishlist
INNER JOIN products ON mywishlist.`pid`=products.`id` WHERE
products.`id`='$id'") or die("My Wish Size Problem"."<br/><br/>".mysql_error());
$row=mysql_fetch_array($result);
return $row['wid'];
}