Skip to content

best way for check if dbObject has result. #394

@KTP95

Description

@KTP95

Dear,
For example

//when user not exist...
$user = user::ById(999); 

// Always is 0,
echo (int) empty($user); 
// Only checking a prop work
echo (int) empty($user->ID);  // can be 1 or 0

but I DisLike checking every time a prop...is bad,

Maybe is possible implement a method ?
example:
echo (int) $user->isEmpty(); or isIsset(), or...maybe bettercorrest $user->hasResult()...

thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions