- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
<?php
...
mysql_select_db($database_store, $store);
$query_rsThisCategoryItems = sprintf("SELECT DISTINCT store_products.product_name, store_products.image_file, store_products.product_id, store_products.product_price, store_products_to_categories.category_id, store_products.sku FROM store_products_to_categories, store_products WHERE store_products_to_categories.category_id=%s AND store_products_to_categories.product_id=store_products.product_id GROUP BY store_products.product_name", GetSQLValueString($cat_rsThisCategoryItems, "int"));
$rsThisCategoryItems = mysql_query($query_rsThisCategoryItems, $store) or die(mysql_error());
$row_rsThisCategoryItems = mysql_fetch_assoc($rsThisCategoryItems);
$totalRows_rsThisCategoryItems = mysql_num_rows($rsThisCategoryItems);
//product query
$colname_rsThisProduct = "1";
if (isset($_GET['p_id'])) {
$colname_rsThisProduct = $_GET['p_id'];
}
mysql_select_db($database_store, $store);
$query_rsThisProduct = sprintf("SELECT * FROM store_products WHERE product_id=%s", GetSQLValueString($colname_rsThisProduct, "int"));
$rsThisProduct = mysql_query($query_rsThisProduct, $store) or die(mysql_error());
$row_rsThisProduct = mysql_fetch_assoc($rsThisProduct);
$totalRows_rsThisProduct = mysql_num_rows($rsThisProduct);
//cart contents for header summary
$colname_rsQuickCart = "-1";
if (isset($_SESSION['sessionid'])) {
$colname_rsQuickCart = $_SESSION['sessionid'];
}
mysql_select_db($database_store, $store);
$query_rsQuickCart = sprintf("SELECT * FROM store_cart, store_products WHERE store_cart.session_id = %s AND store_cart.product_id=store_products.product_id", GetSQLValueString($colname_rsQuickCart, "text"));
$rsQuickCart = mysql_query($query_rsQuickCart, $store) or die(mysql_error());
$row_rsQuickCart = mysql_fetch_assoc($rsQuickCart);
$totalRows_rsQuickCart = mysql_num_rows($rsQuickCart);
$colname_rsCartTotal = "-1";
if (isset($_SESSION['sessionid'])) {
$colname_rsCartTotal = $_SESSION['sessionid'];
}
mysql_select_db($database_store, $store);
$query_rsCartTotal = sprintf("SELECT SUM(total_price) FROM store_cart WHERE session_id = %s", GetSQLValueString($colname_rsCartTotal, "text"));
$rsCartTotal = mysql_query($query_rsCartTotal, $store) or die(mysql_error());
$row_rsCartTotal = mysql_fetch_assoc($rsCartTotal);
$totalRows_rsCartTotal = mysql_num_rows($rsCartTotal);
...
?>
пришёл на работу.
Дали до делать вебсайт
увидел ЭТО....и обиделся на аФФтара О_о