Example #1
0
 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));
 }
Example #2
0
 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));
 }