@@ 71-85 (lines=15) @@ | ||
68 | ||
69 | $location = new Location(); |
|
70 | ||
71 | if ($result->num_rows > 0) |
|
72 | { |
|
73 | // output data of each row |
|
74 | while($row = $result->fetch_assoc()) |
|
75 | { |
|
76 | $location->setLat($row['lat']); |
|
77 | $location->setLng($row['lng']); |
|
78 | $location->setCityName($row['name']); |
|
79 | } |
|
80 | } |
|
81 | else |
|
82 | { |
|
83 | echo "Error: 0 results"; |
|
84 | error_log("Error no Location found - getLocation"); |
|
85 | } |
|
86 | ||
87 | if($location->getLat() == $lat && $location->getLng() == $lng && $location->getCityName() == $name) |
|
88 | { |
|
@@ 160-174 (lines=15) @@ | ||
157 | ||
158 | $location = new Location(); |
|
159 | ||
160 | if ($result->num_rows > 0) |
|
161 | { |
|
162 | // output data of each row |
|
163 | while($row = $result->fetch_assoc()) |
|
164 | { |
|
165 | $location->setLat($row['lat']); |
|
166 | $location->setLng($row['lng']); |
|
167 | $location->setCityName($row['name']); |
|
168 | } |
|
169 | } |
|
170 | else |
|
171 | { |
|
172 | echo "Error: 0 results"; |
|
173 | error_log("Error no Location found - getLocation"); |
|
174 | } |
|
175 | ||
176 | return $location; |
|
177 | } |