当前位置: 首页>>代码示例>>PHP>>正文


PHP Table::findAll方法代码示例

本文整理汇总了PHP中Table::findAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::findAll方法的具体用法?PHP Table::findAll怎么用?PHP Table::findAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Table的用法示例。


在下文中一共展示了Table::findAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Table

<?php

/**
 * 统计下状态正常的产品信息数量
 */
$tableObj = new Table("txonline");
$id = 0;
$num = 0;
while (1) {
    $mysqlRs = $tableObj->findAll("select id, keyword, state from gckeyword.key_proword where id > '" . $id . "' order by id asc limit 100");
    if (empty($mysqlRs)) {
        exit("统计完毕\n");
    }
    foreach ($mysqlRs as $value) {
        $id = $value["id"];
        echo $id . "\t" . $num . "\n";
        if ($value["state"] < 0) {
            continue;
        }
        $num++;
    }
}
class Config
{
    public static $dbArr = array('localhost' => array('192.168.12.70', "root", "123456", "test"), 'online' => array('192.168.2.163', "gongchangdb", "gongchangdb7232275", "caijiproductinfo"), 'info' => array('192.168.2.101', 'hangye', 'hangye7232275', 'hangye'), 'local' => array('192.168.8.18', 'root', 'gc7232275', 'gcoperate'), "local170" => array('192.168.8.170', "root", "gc7232275", "test"), 'local189' => array('192.168.8.189', 'gongchang', 'gongchang123', 'gckeyword'), 'main' => array('read.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), 'maind' => array('write.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), "product" => array("pdinfo.read.mysql.ch.gongchang.com", "gccontent", "gccontent7232275", "caijiproductinfo"), 'club' => array('55651c3e54ae6.sh.cdb.myqcloud.com', 'cdb_outerroot', 'ScIwH*3fEB(', 'cn_clubnew', 8287), 'txonline' => array('172.17.18.4', 'gckeyword', 'WVwVaxADjX9z3PHd', 'gckeyword'));
    public static $cateApiUrl = 'http://cate.ch.gongchang.com/cate_json/';
}
class Table
{
    public $conn = '';
    public $config;
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:countPro.php

示例2: __construct

 */
header("Content-type:text/html;charset=utf-8");
define("ROOT", substr(__FILE__, 0, stripos(__FILE__, "tianyunchong.select")));
$conn = new Table("local198");
$cateid = isset($_GET["cateid"]) ? trim($_GET["cateid"]) : "";
if (empty($cateid)) {
    $parentid = 0;
} else {
    $cateInfo = $conn->findOne("select * from fbcateinfo.fbcate_cateinfo where cateid='" . $cateid . "' limit 1");
    if ($cateInfo) {
        $parentid = $cateInfo["cateid"];
    } else {
        $parentid = 0;
    }
}
$cateArr = $conn->findAll("select * from fbcateinfo.fbcate_cateinfo where parentid='{$parentid}' limit 100");
require ROOT . 'tianyunchong.select/templates/forbuyers/catechild.phtml';
class Config
{
    public static $dbArr = array('localhost' => array('192.168.12.70', "root", "123456", "test"), 'online' => array('192.168.2.163', "gongchangdb", "gongchangdb7232275", "caijiproductinfo"), 'info' => array('192.168.2.101', 'hangye', 'hangye7232275', 'hangye'), 'local' => array('192.168.8.18', 'root', 'gc7232275', 'gcoperate'), "local170" => array('192.168.8.170', "root", "gc7232275", "test"), 'local189' => array('192.168.8.189', 'gongchang', 'gongchang123', 'gckeyword'), 'local198' => array('192.168.8.198', 'root', '123456', 'fbproduct'), 'main' => array('read.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), 'maind' => array('write.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), "product" => array("pdinfo.read.mysql.ch.gongchang.com", "gccontent", "gccontent7232275", "caijiproductinfo"), 'club' => array('55651c3e54ae6.sh.cdb.myqcloud.com', 'cdb_outerroot', 'ScIwH*3fEB(', 'cn_clubnew', 8287), 'txonline' => array('172.17.18.4', 'gckeyword', 'WVwVaxADjX9z3PHd', 'gckeyword'));
    public static $cateApiUrl = 'http://cate.ch.gongchang.com/cate_json/';
}
class Table
{
    public $conn = '';
    public $config;
    public function __construct($connName)
    {
        $db = Config::$dbArr;
        $this->config = $db[$connName];
        try {
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:index.php

示例3: Table

<?php

/**
 * 初始化所有的关键词组
 */
include_once "common.php";
$conn = new Table("local189");
$conn->query("TRUNCATE TABLE  `tianyunzi`.`360_group`");
$jihuaArr = $conn->findAll("select * from tianyunzi.360_jihua limit 100");
$api = "https://api.e.360.cn/account/clientLogin";
$postData = array("format" => "json", "username" => "郑州悉知", "passwd" => "7232275XZgcw");
$md = md5("7232275XZgcw");
$key = "15fdeq7buepvssh8z899rusa6ynxufyn";
$m = new Xcrypt(substr($key, 0, 16), 'cbc', substr($key, 16, 16));
$postData["passwd"] = $m->encrypt($md, 'hex');
$header = array();
$header[] = "serveToken:" . microtime(1);
$header[] = "apiKey:1kg8tunzfxt8zvzpf53vjr5es45lvszh";
$str = curlPost($api, $header, $postData);
if (!isset($str["accessToken"])) {
    exit("用户登录验证失败!\n");
} else {
    echo "用户登录验证成功!\n";
}
$header[] = "accessToken:" . $str["accessToken"];
$header[] = "sessionToken:" . $str["sessionToken"];
foreach ($jihuaArr as $value) {
    $api = "https://api.e.360.cn/2.0/group/getIdListByCampaignId";
    $params = array("format" => "json", "campaignId" => intval($value["id"]));
    $str = curlPost($api, $header, $params);
    if (!isset($str["groupIdList"])) {
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:initGroup.php

示例4: Table

<?php

/**
 * 初始化所有的关键词入库
 */
include_once "common.php";
$conn = new Table("local189");
$conn->query("TRUNCATE TABLE  `tianyunzi`.`360_keywords`");
$jihuaArr = $conn->findAll("select * from tianyunzi.360_jihua limit 100");
$api = "https://api.e.360.cn/account/clientLogin";
$postData = array("format" => "json", "username" => "郑州悉知", "passwd" => "7232275XZgcw");
$md = md5("7232275XZgcw");
$key = "15fdeq7buepvssh8z899rusa6ynxufyn";
$m = new Xcrypt(substr($key, 0, 16), 'cbc', substr($key, 16, 16));
$postData["passwd"] = $m->encrypt($md, 'hex');
$header = array();
$header[] = "serveToken:" . microtime(1);
$header[] = "apiKey:1kg8tunzfxt8zvzpf53vjr5es45lvszh";
$str = curlPost($api, $header, $postData);
if (!isset($str["accessToken"])) {
    exit("用户登录验证失败!\n");
} else {
    echo "用户登录验证成功!\n";
}
$header[] = "accessToken:" . $str["accessToken"];
$header[] = "sessionToken:" . $str["sessionToken"];
$groupid = 0;
while (1) {
    $groupArr = $conn->findAll("select * from tianyunzi.360_group where id > '{$groupid}' order by id asc limit 100");
    if (empty($groupArr)) {
        exit("所有的关键词处理完毕\n");
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:InitKeyword.php

示例5: Table

<?php

/**
 * 用户信息转移
 * @author tianyunchong
 * @datetime 2016/05/26
 */
ini_set('magic_quotes_gpc', "1");
include_once "../common.php";
$conn = new Table("forbuyers-test");
$connLocal = new Table("local198");
$supid = 0;
while (1) {
    $userArr = $conn->findAll("select * from fbsupplier.fb_sup_user where supid > '" . $supid . "' limit 100");
    if (empty($userArr)) {
        break;
    }
    foreach ($userArr as $value) {
        $supid = $value["supid"];
        $existArr = $connLocal->findOne("select * from fbsupplier.fb_sup_user where supid = '" . $supid . "' limit 1");
        if ($existArr) {
            continue;
        }
        /** 邮箱不能重复 */
        $existArr = $connLocal->findOne("select * from fbsupplier.fb_sup_user where email = '" . $value["email"] . "' limit 1");
        if ($existArr) {
            continue;
        }
        $value["notice"] = intval($value["notice"]);
        $connLocal->insert($value, "fbsupplier.fb_sup_user");
        echo $supid . "\t" . $value["username"] . "\n";
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:supuser.php

示例6: updateKeyword

<?php

$localObj = new Table("local");
$onlineObj = new Table("txonline");
$id = 358403;
while (1) {
    echo $id, "\n";
    $resultRs = $localObj->findAll("select * from tianyunzi.phome_ecms_keywords where id > '{$id}' order by id asc limit 100");
    if (empty($resultRs)) {
        exit("所有数据处理完毕\n");
    }
    foreach ($resultRs as $value) {
        $id = $value["id"];
        updateKeyword($value);
    }
}
function updateKeyword($keywordArr)
{
    global $onlineObj;
    $keywordMysql = $onlineObj->findOne("select * from gckeyword.key_proword where keyword = '" . $keywordArr["title"] . "' limit 1");
    if (empty($keywordMysql)) {
        echo $keywordArr['title'] . "  不在当前词库中存在!\n";
        return false;
    }
    //开始更新数据
    $mainword = array_filter(explode("|", $keywordArr["mainword"]));
    $mainword = getMysqlJson($mainword);
    $f_word = array_filter(explode("|", $keywordArr["f_word"]));
    if (empty($f_word)) {
        $f_word = $keywordMysql["redword"];
    } else {
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:keyword.php

示例7: exit

/** 开查下用户信息 */
$userInfo = $conn18->findOne("select * from alienglish.fb_sup_user where supid = '" . $uid . "' limit 1");
if (empty($userInfo)) {
    exit("用户信息不存在!");
}
/** 开查下企业信息 */
$comInfo = $conn18->findOne("select * from alienglish.fb_company where supid = '" . $uid . "' limit 1");
if (empty($comInfo)) {
    exit("企业信息不存在!");
}
$cid = $comInfo["cid"];
$domain = $comInfo["domain"];
/** 开查下产品信息 */
$id = 0;
while (1) {
    $productMapArr = $conn18->findAll("select * from alienglish.pd_cate where id > '" . $id . "' order by id asc limit 100");
    if (empty($productMapArr)) {
        break;
    }
    foreach ($productMapArr as $value) {
        $id = $value["id"];
        if ($value["domain"] != $domain) {
            echo "alipid\t" . $value["alipid"] . "\t跳过\n";
            continue;
        }
        $alipid = $value["alipid"];
        $productData = $conn18->findOne("select * from alienglish.pd_info where alipid = '" . $alipid . "' limit 1");
        if (empty($productData)) {
            continue;
        }
        /** 开始处理单条的产品信息 */
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:moveAliProduct.php

示例8: Table

<?php

/**
 * 获取下所有的关键词处理标记为竞价
 */
$id = 0;
/* 清空下所有的关键词 */
$beanstalk = new \Phalcon\Queue\Beanstalk(array("host" => "172.17.16.101", "port" => 11300));
while (1) {
    $conn = new Table("local");
    $groupArr = $conn->findAll("select * from tianyunzi.baidu_group where id > '{$id}' order by id asc limit 100");
    if (empty($groupArr)) {
        echo "所有的单元已经过完\n";
        exit;
    }
    foreach ($groupArr as $value) {
        $id = $value["id"];
        /* 获取当前单元下的所有关键词 */
        $keywordArr = getKeyword($value["id"]);
        if (empty($keywordArr) || !isset($keywordArr["body"]["data"])) {
            echo "计划[" . $value["jihuaname"] . "],单元[" . $value["groupname"] . "],没有查到关键词\n";
            continue;
        }
        foreach ($keywordArr["body"]["data"] as $value1) {
            /* 插入数据库 */
            $insertArr = array("id" => $value1["keywordId"], "campaignId" => $value1["campaignId"], "adgroupId" => $value1["adgroupId"], "keyword" => $value1["keyword"], "pcDestinationUrl" => $value1["pcDestinationUrl"]);
            echo $insertArr["keyword"] . "\n";
            writeBeans($insertArr["keyword"]);
            //file_put_contents("/tmp/keyword.log", $insertArr["keyword"] . "\n", FILE_APPEND);
        }
    }
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:getAllKeywords.php

示例9: Table

<?php

/**
 * 处理下存在全毛的相关分类
 */
$id = 0;
$conn = new Table("txonline");
$beanstalk = new \Phalcon\Queue\Beanstalk(array("host" => "172.17.16.101", "port" => 11300));
while (1) {
    $keywordMysql = $conn->findAll("select id, keyword, relacateid from gckeyword.key_proword where id > '{$id}' order by id asc limit 100");
    if (empty($keywordMysql)) {
        exit("所有数据处理完毕");
    }
    foreach ($keywordMysql as $value) {
        $id = $value["id"];
        if (!strstr($value["relacateid"], "1270")) {
            continue;
        }
        $conn->update("update gckeyword.key_proword set relacateid = '' where id = '" . $value["id"] . "'");
        try {
            $beanstalk->choose('v3www_prokeyword_rela');
            echo $beanstalk->put($value["id"], array('priority' => 1024, 'delay' => 0, 'ttr' => 86400)), "\n";
        } catch (\Exception $e) {
        }
        exit;
    }
}
class Config
{
    public static $dbArr = array('localhost' => array('192.168.12.70', "root", "123456", "test"), 'online' => array('192.168.2.163', "gongchangdb", "gongchangdb7232275", "caijiproductinfo"), 'info' => array('192.168.2.101', 'hangye', 'hangye7232275', 'hangye'), 'local' => array('192.168.8.18', 'root', 'gc7232275', 'gcoperate'), "local170" => array('192.168.8.170', "root", "gc7232275", "test"), 'local189' => array('192.168.8.189', 'gongchang', 'gongchang123', 'gckeyword'), 'main' => array('read.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), 'maind' => array('write.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), "product" => array("pdinfo.read.mysql.ch.gongchang.com", "gccontent", "gccontent7232275", "caijiproductinfo"), 'club' => array('55651c3e54ae6.sh.cdb.myqcloud.com', 'cdb_outerroot', 'ScIwH*3fEB(', 'cn_clubnew', 8287), 'txonline' => array('172.17.18.4', 'gckeyword', 'WVwVaxADjX9z3PHd', 'gckeyword'));
    public static $cateApiUrl = 'http://cate.ch.gongchang.com/cate_json/';
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:keywordquanmao.php

示例10: Table

<?php

/**
 * 产品信息索引信息入库
 */
include_once "../common.php";
$conn = new Table("local198");
$pid = 0;
while (1) {
    $productArr = $conn->findAll("select * from fbproduct.pd_info where pid > '" . $pid . "' order by pid asc limit 100");
    if (empty($productArr)) {
        break;
    }
    foreach ($productArr as $value) {
        $pid = $value["pid"];
        /** 获取下企业信息 */
        $companyArr = $conn->findOne("select * from fbsupplier.fb_company where cid = '" . $value["cid"] . "' limit 1");
        $userArr = $conn->findOne("select * from fbsupplier.fb_sup_user where supid = '" . $value["uid"] . "' limit 1");
        $esArr = array("pid" => $value["pid"], "proname" => $value["proname"], "prokey" => $value["prokey"], "property" => getProperty($value["property"], $value["userproperty"]), "cate1" => $value["cate1"], "cate2" => $value["cate2"], "cate3" => $value["cate3"], "cate4" => $value["cate4"], "categoryid" => $value["cate4"] ? $value["cate4"] : ($value["cate3"] ? $value["cate3"] : $value["cate2"]), "groupid" => getGroupIdArr($value["pid"]), "pubtime" => $value["pubtime"], "uptime" => $value["uptime"], "star" => $value["star"], "province" => $companyArr["province"], "city" => $companyArr["city"], "cid" => $value["cid"], "uid" => $value["uid"], "is_verified" => $companyArr["is_verfied"], "is_vip" => $companyArr["is_vip"], "mobile_verified" => $userArr["mobile_checked"], "email_verified" => $userArr["email_checked"], "mincount" => $value["mincount"], "state" => $value["state"]);
        /** 开始创建es */
        $params = array("index" => "forbuyers_product", "type" => "product", "id" => $esArr["pid"], "body" => $esArr);
        $response = $client->index($params);
        if (isset($response["created"]) && $response["created"]) {
            echo $pid . "\tcreat success!\n";
        }
    }
}
/**
 * 获取产品分组
 *
 * @Author   tianyunzi
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:product.php

示例11: Table

/**
 * 开始更新处理百度关键词
 */
define("ROOT", "/data/cap/php/");
$conn = new Table("local");
$fp = fopen(ROOT . "baidu1.csv", "r");
while ($data = fgetcsv($fp)) {
    if (empty($data[0]) || $data[0] == "关键词") {
        continue;
    }
    $jihua = trim($data[0]);
    $group = trim($data[1]);
    $keyword = trim($data[2]);
    $url = trim($data[3]);
    $keywordRs = $conn->findAll("select * from tianyunzi.baidu_keywords where keyword = '" . $keyword . "' limit 10");
    if (count($keywordRs) <= 1) {
        echo $keyword . "\n";
        continue;
    }
    $jihuaArr = $conn->findOne("select * from tianyunzi.baidu_jihua where name = '" . $jihua . "' limit 1");
    if (empty($jihuaArr)) {
        echo "============未知的计划" . $jihua . "==================\n";
        continue;
    }
    $groupArr = $conn->findOne("select * from tianyunzi.baidu_group where groupname = '" . $group . "' limit 1");
    if (empty($groupArr)) {
        echo "==============未知的分组" . $group . "=================\n";
        continue;
    }
    $keywordRs = $conn->findOne("select * from tianyunzi.baidu_keywords where keyword = '" . $keyword . "' and campaignId = '" . $jihuaArr["id"] . "' and adgroupId = '" . $groupArr["id"] . "' limit 1");
开发者ID:tianyunchong,项目名称:php,代码行数:30,代码来源:updateBaidunew.php

示例12: Table

<?php

/**
 * 帮助中心信息处理
 * 把您改成你
 */
$onlineObj = new Table("txonline");
$id = 0;
while (1) {
    $mysqlRs = $onlineObj->findAll("select * from gcbuyer.com_article where id > '{$id}' order by id asc limit 100");
    if (empty($mysqlRs)) {
        exit("所有信息处理完毕");
    }
    foreach ($mysqlRs as $value) {
        $id = $value["id"];
        echo $id;
        echo "\n";
        $checkStr = $value["articletitle"] . $value["content"] . $value["smalltext"];
        if (strstr($checkStr, "您") || strstr($checkStr, "账号") || strstr($checkStr, "账户")) {
            var_dump($value);
            echo "\n";
            $updateArr = array("articletitle" => str_replace(array("您", "账号", "账户"), array("你", "帐号", "帐户"), $value["articletitle"]), "content" => str_replace(array("您", "账号", "账户"), array("你", "帐号", "帐户"), $value["content"]), "smalltext" => str_replace(array("您", "账号", "账户"), array("你", "帐号", "帐户"), $value["smalltext"]));
            $onlineObj->update("update gcbuyer.com_article set articletitle = '" . $updateArr["articletitle"] . "', content = '" . $updateArr["content"] . "', smalltext = '" . $updateArr["smalltext"] . "' where id = '" . $value["id"] . "'");
        } else {
            continue;
        }
    }
}
class Config
{
    public static $dbArr = array('localhost' => array('192.168.12.70', "root", "123456", "test"), 'online' => array('192.168.2.163', "gongchangdb", "gongchangdb7232275", "caijiproductinfo"), 'info' => array('192.168.2.101', 'hangye', 'hangye7232275', 'hangye'), 'local' => array('192.168.8.18', 'root', 'gc7232275', 'gcoperate'), "local170" => array('192.168.8.170', "root", "gc7232275", "test"), 'local189' => array('192.168.8.189', 'gongchang', 'gongchang123', 'gckeyword'), 'main' => array('read.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), 'maind' => array('write.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), "product" => array("pdinfo.read.mysql.ch.gongchang.com", "gccontent", "gccontent7232275", "caijiproductinfo"), 'club' => array('55651c3e54ae6.sh.cdb.myqcloud.com', 'cdb_outerroot', 'ScIwH*3fEB(', 'cn_clubnew', 8287), 'txonline' => array('172.17.18.4', 'root', 'gc7232275', 'gckeyword'));
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:help.php

示例13: __construct

<?php

/**
 * 打入相关关键词预热脚本
 */
$id = 46607377;
$config = array('172.17.16.101', 11300);
$queue = new \Phalcon\Queue\Beanstalk(array("host" => $config[0], "port" => $config[1]));
$conn = new Table("txonline");
$keywordRs = $conn->findAll("select id, keyword from gckeyword.key_proword where id >=46607318 and id <= 46607375 limit 100");
foreach ($keywordRs as $value) {
    echo $value["id"] . "\n";
    try {
        $queue->choose('v3www_prokeyword_rela');
        echo $queue->put($value["id"], array('priority' => 1024, 'delay' => 0, 'ttr' => 86400)), "\n";
    } catch (\Exception $e) {
    }
}
class Config
{
    public static $dbArr = array('localhost' => array('192.168.12.70', "root", "123456", "test"), 'online' => array('192.168.2.163', "gongchangdb", "gongchangdb7232275", "caijiproductinfo"), 'info' => array('192.168.2.101', 'hangye', 'hangye7232275', 'hangye'), 'local' => array('192.168.8.18', 'root', 'gc7232275', 'gcoperate'), "local170" => array('192.168.8.170', "root", "gc7232275", "test"), 'local189' => array('192.168.8.189', 'gongchang', 'gongchang123', 'gckeyword'), 'main' => array('read.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), 'maind' => array('write.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), "product" => array("pdinfo.read.mysql.ch.gongchang.com", "gccontent", "gccontent7232275", "caijiproductinfo"), 'club' => array('55651c3e54ae6.sh.cdb.myqcloud.com', 'cdb_outerroot', 'ScIwH*3fEB(', 'cn_clubnew', 8287), 'txonline' => array('172.17.18.4', 'gckeyword', 'WVwVaxADjX9z3PHd', 'gckeyword'));
    public static $cateApiUrl = 'http://cate.ch.gongchang.com/cate_json/';
}
class Table
{
    public $conn = '';
    public $config;
    public function __construct($connName)
    {
        $db = Config::$dbArr;
        $this->config = $db[$connName];
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:keywordrela.php

示例14: Table

<?php

/**
 * 清除掉社区采集的问答
 */
$clubObj = new Table("club");
$id = 1143160;
$fids = array(155, 156, 157, 158);
while (1) {
    $mysqlRs = $clubObj->findAll("select * from pre_forum_thread where tid > '{$id}' order by tid asc limit 100");
    if (empty($mysqlRs)) {
        exit("所有数据处理完毕!");
    }
    foreach ($mysqlRs as $value) {
        $id = $value["tid"];
        echo $id . "\n";
        if (!in_array($value["fid"], $fids)) {
            continue;
        }
        if ($value["authorid"] != "2563479") {
            continue;
        }
        var_dump($value);
        echo "\n";
        $clubObj->query("delete from pre_forum_thread where tid = '" . $value["tid"] . "'");
    }
}
class Config
{
    public static $dbArr = array('localhost' => array('192.168.12.70', "root", "123456", "test"), 'online' => array('192.168.2.163', "gongchangdb", "gongchangdb7232275", "caijiproductinfo"), 'info' => array('192.168.2.101', 'hangye', 'hangye7232275', 'hangye'), 'local' => array('192.168.8.18', 'root', 'gc7232275', 'gcoperate'), "local170" => array('192.168.8.170', "root", "gc7232275", "test"), 'local189' => array('192.168.8.189', 'gongchang', 'gongchang123', 'gckeyword'), 'main' => array('read.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), 'maind' => array('write.mysql.ch.gongchang.com', 'gcwork', 'gcwork7232275', 'catesearch'), "product" => array("pdinfo.read.mysql.ch.gongchang.com", "gccontent", "gccontent7232275", "caijiproductinfo"), 'club' => array('172.17.18.2', 'root', 'gc7232275', 'cn_clubnew', 3306), 'txonline' => array('172.17.18.4', 'gckeyword', 'WVwVaxADjX9z3PHd', 'gckeyword'));
    public static $cateApiUrl = 'http://cate.ch.gongchang.com/cate_json/';
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:club_wenda.php

示例15: getComUrl

<?php

/**
 * 企业详情seo需要打入队列处理数据
 */
define("APP_DEV", "dev");
if (APP_DEV == 'dev') {
    $cfg = array('host' => '192.168.8.18', 'port' => '5672', 'login' => 'admin', 'password' => 'gc7232275', 'vhost' => '/');
    $txonline = new Table("local189");
} else {
    $cfg = array('host' => '172.17.16.108', 'port' => '5672', 'login' => 'admin', 'password' => 'gc7232275', 'vhost' => '/');
    $txonline = new Table("txonline");
}
$id = 0;
while (1) {
    $mysqlRs = $txonline->findAll("select cid,province from combusiness.cb_combusiness where cid > '{$id}' order by cid asc limit 100");
    if (empty($mysqlRs)) {
        exit("所有数据处理完毕\n");
    }
    foreach ($mysqlRs as $value) {
        $id = $value["cid"];
        echo getComUrl($value["cid"], $value["province"]);
        writeRMQ("v3cb", "hy", $id);
        echo $id, "\n";
    }
}
function getComUrl($cid, $pid)
{
    return "http://company.gongchang.com/p-{$pid}/{$cid}_" . getCombusAuth($cid) . '/';
}
function getCombusAuth($cid)
开发者ID:tianyunchong,项目名称:php,代码行数:31,代码来源:comdetailseo.php


注:本文中的Table::findAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。