In the Model
, how to execute a SQL string in a simple and best way (with the minimal system resources) ? For example:
class Robots Extends Model
{
//...
public static function findSomething()
{
$sql = "Select count(`id`) from `robots`";
//Here, How to execute the $sql string, and return a total number of robots
}
}