$sql="SELECT count(*) as pcount FROM news" 和$sql = "UPDATE article SET这句是什么意思?

问题描述:

$sql="SELECT count(*) as pcount FROM news" 和$sql = "UPDATE article SET这句是什么意思?

SELECT count(*) as pcount FROM news
得出table news有多少条记录
UPDATE article SET 这是半句 没有写完
这句话是要update table articleif(!empty($_POST)){$content = $_POST['content'];$sql = "UPDATE article SET content = '$content' WHERE id=1";$result = mysql_query($sql);if($result){show_msg("更新成功", "about_us.php");}}//获取公司简介$about = array();$sql = "SELECT * FROM article WHERE id = 1";$result = mysql_query($sql);if($result && mysql_num_rows($result)){$about = mysql_fetch_array($result);}如果post 是空$content=post['content']更新table article 让 id为1的content=$content 执行sql检查是否执行sql如果是显示更新成功$about=数组()从table article选择id=1的全部记录执行sql结果显示行号$about=结果集返回的数组