public function updateOpenIdQQ() { $mysql = new Mysql(); $sql = "update " . $mysql->dbpre . "user" . $mysql->debug . " set \n\t\t\tOpenIdQQ='" . $mysql->escape($this->OpenIdQQ) . "'\n\t\t\t WHERE UserId=" . intval($this->UserId); $mysql->runSql($sql); $result = $mysql->affectedRows(); $mysql->closeDb(); return $result; }
public function delete() { $mysql = new Mysql(); $sql = "delete from " . $mysql->dbpre . "hours" . $mysql->debug . "\n\t\t\t WHERE Id=" . intval($this->Id); //echo $sql; $mysql->runSql($sql); $result = $mysql->affectedRows(); $mysql->closeDb(); return $result; }
public function update() { $mysql = new Mysql(); $sql = "update " . $mysql->dbpre . "project" . $mysql->debug . " set \n\t\t\tSubject='" . $mysql->escape($this->Subject) . "',\n\t\t\tType=" . intval($this->Type) . ",\n\t\t\tDepartment=" . intval($this->Department) . ",\n\t\t\tTeam=" . intval($this->Team) . ",\n\t\t\tPublishTime='" . $mysql->escape($this->PublishTime) . "',\n\t\t\tStatus='" . $mysql->escape($this->Status) . "',\n\t\t\tHours='" . $mysql->escape($this->Hours) . "',\n\t\t\tDeveloper='" . $mysql->escape($this->Developer) . "',\n\t\t\tSchedule='" . $mysql->escape($this->Schedule) . "',\n\t\t\tDetail='" . $mysql->escape($this->Detail) . "',\n\t\t\tPv='" . $mysql->escape($this->Pv) . "',\n\t\t\tUv='" . $mysql->escape($this->Uv) . "',\n\t\t\tFans='" . $mysql->escape($this->Fans) . "',\n\t\t\tSummary='" . $mysql->escape($this->Summary) . "',\n\t\t\tUrl='" . $mysql->escape($this->Url) . "',\n\t\t\tQrCode='" . $mysql->escape($this->QrCode) . "',\n\t\t\tLaud=" . intval($this->Laud) . "\n\t\t\t WHERE Id=" . intval($this->Id); //echo $sql; $mysql->runSql($sql); $result = $mysql->affectedRows(); $mysql->closeDb(); return $result; }
public function deleteByProjectId($projectId) { $mysql = new Mysql(); $sql = "DELETE FROM " . $mysql->dbpre . "developer" . $mysql->debug . " WHERE projectId=" . intval($projectId); // var_dump( $sql ); // exit; $result = $mysql->runSql($sql); $mysql->closeDb(); return $result; }
public function add() { $reValue = 0; $mysql = new Mysql(); $sql = "insert into " . $mysql->dbpre . "memo" . $mysql->debug . "(ProjectId,Memo,CreateTime,UserId) values(\n\t\t" . intval($this->ProjectId) . ",\n\t\t'" . $mysql->escape($this->Memo) . "',\n\t\t'" . $mysql->escape($this->CreateTime) . "',\n\t\t" . intval($this->UserId) . "\n\t\t)"; //echo $sql; $mysql->runSql($sql); $reValue = $mysql->lastId(); $mysql->closeDb(); return $reValue; }
public function add() { $reValue = 0; $mysql = new Mysql(); $sql = "insert into boguan_tubu_invit (Name,Phone,Address,CreateTime) values(\n \t\t'" . $mysql->escape($this->Name) . "',\n '" . $mysql->escape($this->Phone) . "',\n \t\t'" . $mysql->escape($this->CreateTime) . "'\n \t\t)"; //echo $sql; $mysql->runSql($sql); $reValue = $mysql->lastId(); if ($mysql->errno() == 1062) { $reValue = -1; } $mysql->closeDb(); return $reValue; }
public function initCategory() { $Belong = intval($this->Belong); $Mysql = new Mysql(); $Sql = "INSERT INTO `category` (`Id`, `Belong`, `Creator`, `Name`, `NameUrl`, `Description`, `ChildCount`, `Status`, `DisplayOrder`, `ParentId`, `Property`, `Image`) VALUES "; $Sql .= "(1001, {$Belong}, 1000, '内容目录', ' ', '树根不显示', 0, 1, 0, -1, 'system', NULL),"; $Sql .= "(2001, {$Belong}, 1000, '默认分类', '', '内容未分类', 0, 1, 0, 1001, 'system', ''),"; $Sql .= "(1002, {$Belong}, 1000, '产品目录', ' ', '树根不显示', 0, 1, 0, -1, 'system', NULL),"; $Sql .= "(2002, {$Belong}, 1000, '默认分类', '', '产品未分类', 0, 1, 0, 1002, 'system', ''),"; $Sql .= "(1003, {$Belong}, 1000, '图片目录', ' ', '树根不显示', 0, 1, 0, -1, 'system', ''),"; $Sql .= "(2003, {$Belong}, 1000, '默认分类', '', '图片默认分类', 0, 1, 0, 1003, 'system', '')"; $Exec = $Mysql->runSql($Sql); if ($Exec === false) { $Res["Success"] = false; $Res['Sql'] = $Sql; } else { $Res["Success"] = true; } return $Res; }
function delPosts($ids) { $mysql = new Mysql(); $sql = "delete from " . $mysql->dbpre . "post" . $mysql->debug . " where belong=" . intval($this->Belong) . " and id in (" . $ids . ")"; $mysql->runSql($sql); $mysql->closeDb(); return true; }