<?php
require('includes/application_top.php');
$selectsql = "select categories_id from categories_description where language_id = 1";
$select_count_products_off = "select count(*) from products where products_status = 0";
$count_products_off = $db->Execute($select_count_products_off);
$cateid = $db->Execute($selectsql);
$i = 0;
while(!$cateid->EOF)
{
$cateidone = $cateid->fields[categories_id];
$updatesql = "update products set products_status = 1 where products_status = 0 and master_categories_id = ".$cateidone." limit 1";
$db->Execute($updatesql);
$select_categories_name = "select categories_name from categories_description where categories_id = " .$cateidone." and language_id = 1";
$select_products_count_off = "select count(*) as cd from products where products_status = 0 and master_categories_id = ".$cateidone;
$caterst = $db->Execute($select_categories_name);
$prorst = $db->Execute($select_products_count_off);
if($prorst) continue;
$categrid[$i]['name'] = $caterst->fields[categories_name];
$categrid[$i]['count'] = $prorst->fields[cd];
$i = $i+1;
$cateid->MoveNext();
}
echo 'It is ok !!!<br />';
$select_products = "select count(*) as c from products where products_status = 0";
$res = $db->Execute($select_products);
echo 'left : '.$res->fields[c].'<br />';
foreach ($categrid as $value)
{
echo $value['name'] . " : [".$value['count'].']<br />';
}
?>
分享到:
相关推荐
【前端开源库-open-in-editor】是一个专为前端开发者设计的实用工具库,它允许用户直接在他们的代码编辑器中打开项目文件,极大地提高了开发效率。这个库的核心功能是通过一个简单的命令或者点击操作,将浏览器中的...
Advances and Open Problems in Federated Learning。Federated learning (FL) is a machine learning setting where many clients (e.g. mobile devices or whole organizations) collaboratively train a model ...
Analyze Me Open Learner Model in an Adaptive Web Testing SystemAnalyze Me Open Learner Model in an Adaptive Web Testing System
open source ESBs in Action open source ESBs in Action
open source ESBs in Action open source ESBs in Action
open source ESBs in Action open source ESBs in Action
Open IFrame In News Table 一款Chrome扩展插件,通过该插件可以右键将网页嵌入的 IFrame 框架 快速使用 新tab 页签打开。
下载此文件,然后直接双击运行,就可以去掉右键菜单中的“open in visual studio"选项
3. **社交媒体集成**:All in One SEO Pack支持设置社交媒体元标签,如Open Graph和Twitter Cards,使得在Facebook、Twitter等社交平台上分享时显示更丰富的信息。 4. **重定向管理**:通过内置的重定向工具,您...
This guide accompanies the release of version 6 of the Open Source Field Operation and Manipulation (OpenFOAM) C++ ...OpenFOAM cover a wide range of problems in fluid dynamics, as described in chapter 3.
The Cisco WebEx products and services may include certain third party and/or free/open source software ("Open Source Software"). The license terms for such Open Source Software are as follows on this ...
eclipse open in explorer 小插件,从硬盘上打开相应文件所在文件夹,很使用的小插件,Myeclipse有,eclipse没有。
sublime3 SideBarEnhancements package安装包 open in browser(使用方法,install 之后,packages 没有出现此文件夹,解压到packages )
1987年有关通信和计算机的Open Problems的会议录。
opentracing: jaeger: udp-sender: host: localhost port: 6831 remote-reporter: flush-interval: 1000 max-queue-size: 5000 log-spans: true probabilistic-sampler: sampling-rate: 1
Openai Api开发文档 | Openai Api中文文档 | Openai Api中英双语文档 ChatGPT是由OpenAI开发的一个人工智能聊天机器人程序,于2022年11月推出。该程序使用基于GPT-3.5架构的大型语言模型并通过强化学习进行训练。 ...
企业服务总线是现代IT世界中的一个复杂主题。它指的是一个架构方案,描述了以一个灵活的,建设性的方式来应对集成挑战。ESB看起来是一个以不同产品实现的方案,它们在...本资源是 Open Source ESB in Action的中文版
[PDF]Linux All-in-one...
OpenACS的部署与使用详细图文教程 OpenACS是一个基于Java的开源内容管理系统,使用Java Servlet技术和Java Server Faces(JSF)来构建Web应用程序。下面将详细介绍OpenACS的部署与使用方法。 知识点一:OpenACS的...