本文整理汇总了PHP中Products::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Products::delete方法的具体用法?PHP Products::delete怎么用?PHP Products::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products
的用法示例。
在下文中一共展示了Products::delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
<td><input type="text" name='id' value='<?php
echo $product['id'];
?>
' hidden/></td>
<td>
<input type="submit" value="Save" style="width:100%;height:100%;"></button>
</td>
</form>
<?php
echo "</tr>";
}
echo " </tbody></table></div></div>";
} elseif ($_GET['y'] == 3) {
$array = $product->delete($_GET['z']);
} elseif ($_GET['y'] == 2) {
$prod = new Products();
$prod->name = $_POST['name'];
$prod->price = $_POST['price'];
$prod->qty = $_POST['qty'];
$prod->sale = $_POST['sale'];
$prods = $prod->update($_POST['id']);
}
}
?>
</div>
<!-- /. ROW -->
</div>
示例2: json_encode
$Product = new Products();
$Product->pname = $name_product;
$Product->productPicture = $upimage;
$Product->price = $price_prodect;
$Product->available = '1';
$Product->cid = $category;
//////////////
// $product->updatecolumn('pname',$Product->pname);
} else {
if ($_GET['code'] == "2") {
$product = new Products();
$product->pid = $_GET['pid'];
$Op = new orderProducts();
$Op->pid = $_GET['pid'];
$Op->deleteByPID();
$product->delete();
}
}
$limit = isset($_GET['limit']) ? $_GET['limit'] : 0;
$res = $product->selectLimit($limit, 4);
$productsArray = array();
for ($i = 0; $i < count($res); $i++) {
$productsArray[$i]['pid'] = $res[$i][0];
$productsArray[$i]['name'] = $res[$i][1];
$productsArray[$i]['price'] = $res[$i][3];
$productsArray[$i]['image'] = $res[$i][2];
}
$replayArr["limit"] = $limit;
$replayArr["allRowsNum"] = count($totalRes);
$replayArr["productsArray"] = $productsArray;
echo json_encode($replayArr);