We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon mongodb find + where ???

  • Help me ... I want to convert php mysql command to phalcon MongoDB
  • MYSQL: $query = "SELECT * FROM table WHERE status > 10 AND status < 100 ORDER BY st DESC LIMIT 100";
  • ==>> phalcon MongoDB: ????

https://docs.phalcon.io/en/latest/reference/odm.html

tks.

You can use......

    $result = Test::find(array(
        "conditions" => array(
                    'status'=>array('$gte' => 0),
                    'status'=>array('$lt' => 100)
                    ),
        "limit" => 5
    ));