$db = new ezSQL_mysql($user,$pass,$db,$server);
$user = $db->get_row("SELECT id,last FROM users WHERE email='$email'");
var_dump($user);
转储返回:
object(stdClass)#11 (5) {
["id"]=>
string(1) "4"
["last"]=>
string(19) "2013-01-06 14:48:24"
}
但是,在尝试通过对象询问用户的 id 时:
$uid=$user->id;
我收到此错误:
Cannot use object of type stdClass as array