First argument should be an array
函数第一个参数必须是一个数组.
$row = mysql_fetch_array($res);
if (is_array($row)){ // or if($row){
extract($row);
}else{
die("SQL execute error!");
}
?>
函数第一个参数必须是一个数组.
$row = mysql_fetch_array($res);
if (is_array($row)){ // or if($row){
extract($row);
}else{
die("SQL execute error!");
}
?>
一般做法是:$result=mysql_query("select * from users where id=$id");
if(@mysql_num_rows($result)){
$row=mysql_fetch_array($result);
extract($row);
//TODO
}