나는 mysql 데이터베이스에서 뭔가를 쿼리하고 조건을 테이블에 값 사이의 평등을 확인하고 싶지만 둥근 후 그것을 둥근 후 어떻게 그것을 수행하는 방법 php codeigniter, plz help 나는이 명령을 넣어 가 바뀝니다 인용쿼리와 함께 라운드 함수를 사용하는 방법 where 절이 있습니까?
$this->db->where('round(`Latitude`,4)', $t);
^-- ^--
: 지금 당신이 PHP round()
기능이 아닌 SQL을 실행하기 위해 노력하고 있기 때문에, 당신은 라운드 전화를 인용 할 필요가
$t=round($latitude,4);
$t1=round($longitude,4);
$this->db->select('place_name');
$this->db->from('place');
$this->db->where(round(`Latitude`,4), $t);
$this->db->where(round(`Longitude`,4),$t1);
$q = $this->db->get();
어떤 오류가 발생합니까? –