以下是我的代码的样子
$update = mysql_query("update profile set status=1 where id='$id_ex'")or die("error from $update".mysql_error());
printf("Affected record is : %d\n", mysql_affected_rows());
谢谢
答案 0 :(得分:0)
直接存储在可变的
中$update = mysql_query("update profile set status=1 where id='$id_ex'")or die("error from $update".mysql_error());
$affected_rows = mysql_affected_rows();
printf("Affected record is $affected_rows");
下面是php documentaion mysql_affected_rows()