本文整理汇总了PHP中Mysql::affectedRows方法的典型用法代码示例。如果您正苦于以下问题:PHP Mysql::affectedRows方法的具体用法?PHP Mysql::affectedRows怎么用?PHP Mysql::affectedRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mysql
的用法示例。
在下文中一共展示了Mysql::affectedRows方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateOpenIdQQ
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;
}
示例2: delete
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;
}
示例3: update
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;
}