level 1
花生米1979
楼主
update更新数据表某个字段的内容,当更新前几次都没有任何问题!!
但更新几次后,
更新修改就没有任何反应了!?
也没报任何错误!请高手们看看,这到底是哪里发了神经,
<?
@$class_text=$_POST['class_text']; //接收文本变量
$x=mysql_query("select * from content");$a=mysql_fetch_array($x); //读取该字段原内容
$p_id="p".time(); //生成一个用时间做字符串的id
$words=$a['words']."<p id=\"".$p_id."\">".$class_text."</p>";
//修改到的数据库里的内容,含义是: $原数据 加上 <p id=“随机id”>$新接收数据</p>
$b=mysql_query("update content set words='$words' where biaoti='u1-1' "); //修改更新到数据库,words的类型的text
mysql_query("update content set new='1' where biaoti='u1-1'"); //修改一个字段的值
if($b)
{echo '写入成功'.'<br>';}
else
{echo '修改失败,出错信息是:'.mysql_error().'<br>';} //即使修改失败,这里也没报任何错误!!!
echo "<meta http-equiv='refresh' content='1;URL=index.php'>";
?>
开头几次更新修改都没任何问题,几个操作后,数据库就不做任何反应了,就是不能再修改了。

2018年08月14日 06点08分
1
但更新几次后,
更新修改就没有任何反应了!?
也没报任何错误!请高手们看看,这到底是哪里发了神经,
<?
@$class_text=$_POST['class_text']; //接收文本变量
$x=mysql_query("select * from content");$a=mysql_fetch_array($x); //读取该字段原内容
$p_id="p".time(); //生成一个用时间做字符串的id
$words=$a['words']."<p id=\"".$p_id."\">".$class_text."</p>";
//修改到的数据库里的内容,含义是: $原数据 加上 <p id=“随机id”>$新接收数据</p>
$b=mysql_query("update content set words='$words' where biaoti='u1-1' "); //修改更新到数据库,words的类型的text
mysql_query("update content set new='1' where biaoti='u1-1'"); //修改一个字段的值
if($b)
{echo '写入成功'.'<br>';}
else
{echo '修改失败,出错信息是:'.mysql_error().'<br>';} //即使修改失败,这里也没报任何错误!!!
echo "<meta http-equiv='refresh' content='1;URL=index.php'>";
?>
开头几次更新修改都没任何问题,几个操作后,数据库就不做任何反应了,就是不能再修改了。

