Welcome Guest, Not a member yet? Register   Sign In
Query method doens't work!
#2

[eluser]SmokeyJoe[/eluser]
generally this looks fine to me.
Maybe you can try it this way to receive an error if it doesn't work

Code:
$this->db->select(a.*, b.*, c.*, (((acos(sin(({$lat} * pi()/180))
* sin((a.latitude * pi()/180))+cos(({$lat} * pi()/180)) * cos((a.latitude * pi()/180))
* cos((({$lng} - a.longitude)*pi()/180))))*180/pi())*60*1.1515*1.609344)
AS distance);
$this->db->from('motoboy AS a');
$this->db->join('veiculo AS b','b.motoboy_id = a.id');
$this->db->join('avaliacao AS c','c.motoboy_id = a.id');
$this->db->where('a.status',1);
$this->db->having('distance <=',$this->distance);
$this->db->order_by('distance','ASC');
$query = $this->db->get();


Messages In This Thread
Query method doens't work! - by El Forum - 07-24-2013, 09:43 AM
Query method doens't work! - by El Forum - 07-25-2013, 12:23 AM
Query method doens't work! - by El Forum - 07-31-2013, 09:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB