Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
ORM queries
  • Is it possible to do such queries in ORM? 'SELECT *, ((lat-'.$lat.')*(lat-'.$lat.')+(lng-'.$lng.')*(lng-'.$lng.')) AS distance FROM addresses HAVING distance < "'.$d*$d*(0.000246176).'" ORDER BY distance' Thanks
  • No. The ORM is not a query builder, it's an ORM. You would use DB::select() or DB::query() to run custom queries. You might have to use DB::expr() in some places to deal with potential quoting issues in the calculation piece.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion