php如何获取cart的typeID和ProductID

时间:2012-08-31 08:17:30

标签: php function shopping-cart

嘿我试图使用php iv购物车与我班上的其他学生交谈,他们认为我的getProductByTypeId查询有问题......它从数据库中获取除了我的ProductID之外的所有内容。 / p>

以下是我的功能......

function getProductsByTypeID($TypeID){

//pull in global connection
global $connection;

//execute query to select all product types
$query="select * from product where TypeID = ".$TypeID;
$result = mysql_query($query, $connection);
testQuery($result);

//return list of customers
return $result;
}

0 个答案:

没有答案