Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Strange Result Need Help
  • When the below query is run at $query->count(); it works correctly but when run as $query->limit(10); it does not
    The AND is ommited from before the second WHERE on $query->limit(10); $query->limit(10); is the simpliest thing it fails as I am actually using Pagination but that wasn't the issue. $query = Model_Property::find()
    ->where(DB::expr($distance), '<=', floatval($position))
    ->order_by('address_number', 'asc');
    just so you know
    $distance = '(((acos(sin(('.$position["lat"].'*pi()/180)) * sin((`address_latitude`*pi()/180))+cos(('.$position["lat"].'*pi()/180))
    * cos((`address_latitude`*pi()/180)) * cos((('.$position["lng"].'- `address_longitude`)*pi()/180))))*180/pi())*60*1.1515*1.609344)';

Howdy, Stranger!

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