public static function findByRawSql($conditions, $params = null) { // A raw SQL statement $sql = "SELECT * FROM robots WHERE {$conditions}"; // Base model $robot = new Robots(); // Execute the query return new Resultset(null, $robot, $robot->getReadConnection()->query($sql, $params)); }
public static function findByCreateInterval() { // A raw SQL statement $sql = "SELECT * FROM robots WHERE id > 0"; // Base model $robot = new Robots(); // Execute the query return new Resultset(null, $robot, $robot->getReadConnection()->query($sql)); }