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


PHP pwQuery::delete方法代码示例

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


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

示例1: deletePayLogsByUids

 /**
  * 根据uid批量删除记录
  * @param array $uids
  * @return bool
  */
 function deletePayLogsByUids($uids)
 {
     if (!S::isArray($uids)) {
         return false;
     }
     return pwQuery::delete($this->_tableName, "uid IN (:uid)", array($uids));
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:12,代码来源:kmdpaylogdb.class.php

示例2: deleteTagsByTagIds

 /**
  * 批量删除标签
  * 
  * @param array $tagids
  * @return boolean
  */
 function deleteTagsByTagIds($tagids)
 {
     if (!S::isArray($tagids)) {
         return false;
     }
     return pwQuery::delete($this->_tableName, "tagid in(:tagid)", array($tagids));
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:13,代码来源:membertagsdb.class.php

示例3: deleteByAreaIds

 /**
  * 批量删除
  * 
  * @param array $areaids  地区IDs
  * @return boolean
  */
 function deleteByAreaIds($areaids)
 {
     if (!S::isArray($areaids)) {
         return false;
     }
     return (bool) pwQuery::delete($this->_tableName, "{$this->_primaryKey} in(:{$this->_primaryKey})", array($areaids));
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:13,代码来源:areasdb.class.php

示例4: deleteByIdentify

 function deleteByIdentify($identify)
 {
     if (!$this->_check() || !$identify) {
         return false;
     }
     return pwQuery::delete($this->_tableName, "identify=:identify", array($identify));
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:7,代码来源:medalinfodb.class.php

示例5: deleteKmdUserByUids

 /**
  * 批量删除用户信息
  * @param array $uids
  * @return bool
  */
 function deleteKmdUserByUids($uids)
 {
     if (!S::isArray($uids)) {
         return false;
     }
     return pwQuery::delete($this->_tableName, "{$this->_primaryKey} IN (:{$this->_primaryKey})", array($uids));
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:12,代码来源:kmduserdb.class.php

示例6: deleteSpreadBySids

 /**
  * 根据套餐id批量删除信息
  * @param array $sids
  * @return bool
  */
 function deleteSpreadBySids($sids)
 {
     if (!S::isArray($sids)) {
         return false;
     }
     return pwQuery::delete($this->_tableName, "{$this->_primaryKey} IN (:{$this->_primaryKey})", array($sids));
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:12,代码来源:kmdspreaddb.class.php

示例7: deleteBySid

 /**
  * 根据链接ID删除数据
  * 
  * @param int $sid  链接ID
  * @return int 删除行数
  */
 function deleteBySid($sid)
 {
     $sid = intval($sid);
     if ($sid < 1) {
         return null;
     }
     pwQuery::delete($this->_tableName, "sid=:sid", array($sid));
     return $this->_db->affected_rows();
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:15,代码来源:sharelinksrelationdb.class.php

示例8: deleteAttentionedTopic

 /**
  * 
  * 删除用户关注的话题
  * @param int $topicId
  * @param int $userid
  * @return boolean
  */
 function deleteAttentionedTopic($topicId, $userid)
 {
     $userid = intval($userid);
     $topicId = intval($topicId);
     if (!$userid || !$topicId) {
         return false;
     }
     pwQuery::delete($this->_tableName, "userid=:userid and topicid=:topicid", array($userid, $topicId));
     return true;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:17,代码来源:weibo_topicattentionsdb.class.php

示例9: while

        $db->update("UPDATE pw_cnclass SET cnsum='0'");
        $query = $db->query("SELECT classid,COUNT(*) AS sum FROM pw_colonys WHERE classid>0 GROUP BY classid");
        while ($rt = $db->fetch_array($query)) {
            $db->update("UPDATE pw_cnclass SET cnsum=" . S::sqlEscape($rt['sum']) . ' WHERE fid=' . S::sqlEscape($rt['classid']));
        }
        $j_url = "{$basename}&action=cache";
        adminmsg('operate_success', $j_url);
    } elseif ($_POST['step'] == 'delcolony') {
        $query = $db->query("SELECT id,cnimg FROM pw_colonys WHERE classid<1");
        while ($rt = $db->fetch_array($query, MYSQL_NUM)) {
            Delcnimg($rt[1]);
            $db->update("UPDATE pw_cmembers a LEFT JOIN pw_ouserdata o ON a.uid=o.uid SET o.groupnum=o.groupnum-1 WHERE a.colonyid=" . S::sqlEscape($rt[0], false) . ' AND o.groupnum>0');
            $db->update("DELETE FROM pw_argument WHERE cyid=" . S::sqlEscape($rt[0], false));
            $db->update("DELETE FROM pw_cmembers WHERE colonyid=" . S::sqlEscape($rt[0], false));
            //* $db->update("DELETE FROM pw_colonys  WHERE id=" . S::sqlEscape($rt[0],false));
            pwQuery::delete('pw_colonys', 'id=:id', array($rt[0]));
        }
        pwFtpClose($ftp);
        adminmsg('operate_success', "{$basename}&action=cache");
    }
} elseif ($action == 'level') {
    require_once A_P . 'action/admin_level.php';
} elseif ($action == 'style') {
    S::gp(array('job'));
    require_once R_P . 'apps/groups/lib/groupstyle.class.php';
    $groupStyle = new GroupStyle();
    $allStyles = $allStylesOfOpen = array();
    $allStyles = $groupStyle->getAllStyles();
    $openStyles = $groupStyle->getOpenStyles();
    $firstGradeStyleIds = $groupStyle->getFirstGradeStyleIds();
    $secondGradeStyles = $groupStyle->getGradeStylesByUpid($firstGradeStyleIds);
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:set.php

示例10: array

            					'post'	=> $post,
            					'reply'	=> $reply
            				))
            			);
            			**/
            $db->pw_update("SELECT * FROM pw_singleright WHERE uid=" . S::sqlEscape($uid), pwQuery::updateClause('pw_singleright', 'uid =:uid', array($uid), array('visit' => $visit, 'post' => $post, 'reply' => $reply)), pwQuery::insertClause('pw_singleright', array('uid' => $uid, 'visit' => $visit, 'post' => $post, 'reply' => $reply)));
            adminmsg('operate_success');
        }
    } elseif ($_POST['job'] == 'del') {
        S::gp(array('selid'), 'P');
        $tmpSelid = $selid;
        if (!($selid = checkselid($selid))) {
            adminmsg('operate_error');
        }
        //* $db->update("DELETE FROM pw_singleright WHERE uid IN($selid)");
        pwQuery::delete('pw_singleright', 'uid IN (:uid)', array($tmpSelid));
        adminmsg('operate_success');
    }
} elseif ($action == 'user') {
    //* include_once pwCache::getPath(D_P.'data/bbscache/level.php');
    //* include_once pwCache::getPath(D_P.'data/bbscache/forumcache.php');
    pwCache::getData(D_P . 'data/bbscache/level.php');
    pwCache::getData(D_P . 'data/bbscache/forumcache.php');
    S::gp(array('page', 'uid', 'fid', 'gid'), GP, 2);
    $username = S::escapeChar(S::getGP('username'));
    $groupcache = $pageurl = '';
    $u_d = array();
    list($hidefid, $hideforum) = GetHiddenForum();
    $forumcache = "<option></option>" . $forumcache . $hideforum;
    $groupcache = "<option></option>";
    $query = $db->query("SELECT gid,grouptitle FROM pw_usergroups WHERE gptype IN('system','special')");
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:singleright.php

示例11: delDiaryByUids

 function delDiaryByUids($uids)
 {
     if (!$uids) {
         return false;
     }
     /**
     		$uids = is_array($uids) ? $this->_getImplodeString($uids) : $this->_addSlashes($uids);
     		return $this->_db->update("DELETE FROM ".$this->_tableName. " WHERE uid IN( " .$uids. " )");
     		**/
     $uids = is_array($uids) ? $uids : array($uids);
     return pwQuery::delete('pw_diary', 'uid IN(:uid)', array($uids));
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:12,代码来源:diarydb.class.php

示例12: recountTopic

 function recountTopic($read, $ifdel, $recycle)
 {
     global $db_anonymousname, $timestamp;
     $ret = 0;
     $tid = $read['tid'];
     $pw_posts = GetPtable($read['ptable']);
     $replies = $this->db->get_value("SELECT COUNT(*) AS replies FROM {$pw_posts} WHERE tid='{$tid}' AND ifcheck='1'");
     if (!$replies) {
         $read['anonymous'] && ($read['author'] = $db_anonymousname);
         if ($ifdel) {
             if ($recycle) {
                 //$this->db->update("UPDATE pw_threads SET fid='0',ifshield='0' WHERE tid='$tid'");
                 pwQuery::update('pw_threads', 'tid = :tid', array($tid), array('fid' => 0, 'ifshield' => 0));
             } else {
                 //* $threadManager = L::loadClass("threadmanager", 'forum');
                 //* $threadManager->deleteByThreadId($read['fid'], $tid);
                 $threadService = L::loadclass('threads', 'forum');
                 $threadService->deleteByThreadId($tid);
                 Perf::gatherInfo('changeThreadWithForumIds', array('fid' => $read['fid']));
                 $pw_tmsgs = GetTtable($tid);
                 //* $this->db->update("DELETE FROM $pw_tmsgs WHERE tid='$tid'");
                 pwQuery::delete($pw_tmsgs, 'tid=:tid', array($tid));
             }
             $ret = 1;
         } else {
             $pwSQL = array('replies' => 0, 'lastposter' => $read['author']);
             !($read['lastpost'] > $timestamp || $read['locked'] > 2) && ($pwSQL['lastpost'] = $read['postdate']);
             //$this->db->update("UPDATE pw_threads SET " . S::sqlSingle($pwSQL) . " WHERE tid=" . S::sqlEscape($tid));
             pwQuery::update('pw_threads', 'tid = :tid', array($tid), $pwSQL);
         }
     } else {
         $pt = $this->db->get_one("SELECT postdate,author,anonymous FROM {$pw_posts} WHERE tid='{$tid}' ORDER BY postdate DESC LIMIT 1");
         $pt['anonymous'] && ($pt['author'] = $db_anonymousname);
         $pwSQL = array('replies' => $replies, 'lastposter' => $pt['author']);
         !($read['lastpost'] > $timestamp || $read['locked'] > 2) && ($pwSQL['lastpost'] = $pt['postdate']);
         //$this->db->update("UPDATE pw_threads SET " . S::sqlSingle($pwSQL) . " WHERE tid=" . S::sqlEscape($tid));
         pwQuery::update('pw_threads', 'tid = :tid', array($tid), $pwSQL);
     }
     return $ret;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:40,代码来源:delarticle.class.php

示例13: deleteCareer

 /**
  * 根据工作经历id删除一条工作经历
  * @param int careerId 工作经历id
  * @return bool
  */
 function deleteCareer($careerId)
 {
     if (!$careerId) {
         return false;
     }
     return pwQuery::delete($this->_tableName, 'careerid=:careerid', array($careerId));
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:12,代码来源:usercareerdb.class.php

示例14: foreach

 S::gp(array('selid'), 'P', 1);
 if (is_array($selid)) {
     foreach ($selid as $value) {
         if (is_numeric($value)) {
             $selids[] = $value;
         }
     }
     $selids = S::sqlImplode($selids);
 }
 !$selids && adminmsg('operate_error', "{$basename}&action=cp");
 $selids = strpos($selids, ',') !== false ? "IN ({$selids})" : "= {$selids}";
 $uids = $dids = array();
 $query = $db->query("SELECT uid,dtid,did FROM pw_diary WHERE did {$selids}");
 while ($rt = $db->fetch_array($query)) {
     //$db->update("DELETE FROM pw_diary WHERE did=".S::sqlEscape($rt['did']));
     pwQuery::delete('pw_diary', 'did=:did', array($rt['did']));
     $db->update("UPDATE pw_diarytype SET num=num-1 WHERE dtid=" . S::sqlEscape($rt['dtid']));
     if ($affected_rows = delAppAction('diary', $rt['did'])) {
         countPosts("-{$affected_rows}");
     }
     $uids[] = $rt['uid'];
     $dids[] = $rt['did'];
 }
 $uids = array_unique($uids);
 updateUserAppNum($uids, 'diary', 'recount');
 //删除日志时,删除微博
 $weiboService = L::loadClass('weibo', 'sns');
 /* @var $weiboService PW_Weibo */
 $weiboArr = $weiboService->getWeibosByObjectIdsAndType($dids, 'diary');
 foreach ($weiboArr as $weibo) {
     $mids[] = $weibo['mid'];
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:manage.php

示例15: delete

 function delete($uid, $behavior)
 {
     return pwQuery::delete($this->_tableName, "uid=:uid AND behavior=:behavior", array($uid, $behavior));
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:4,代码来源:memberbehaviorstatisticdb.class.php


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