How to query data within the TP5 model?

how does a method such as inside the User model get the data? Is it wrong to write like this?

public static function getuid($value){
         return $this->where("username",$value)->find();
}
Mar.10,2021

you are using a static method, you cannot use $this, use self

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5e0da-4579a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5e0da-4579a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?