代码如下:
Class userinfo {
function fetchdatabyemail($email) {
$result=mysql_query(" SELECT * FROM users WHERE email='$email'");
while($row = mysql_fetch_array($result)) {
$name = $row['name'];
$num = $row['num'];
$city = $row['city'];
}
$numrows= mysql_num_rows($result);
}
}
现在获取我这样做的信息:
$info = new userinfo();
$info->fetchdatabyemail('email@email.com');
echo $info->city;
它不返回信息。我想我做错了任何想法请