@@ 385-398 (lines=14) @@ | ||
382 | * @param object $criteria {@link CriteriaElement} to match |
|
383 | * @return int count of categories |
|
384 | */ |
|
385 | public function getCount($criteria = null) |
|
386 | { |
|
387 | $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('martin_auction'); |
|
388 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
|
389 | $sql .= ' ' . $criteria->renderWhere(); |
|
390 | } |
|
391 | $result = $this->db->query($sql); |
|
392 | if (!$result) { |
|
393 | return 0; |
|
394 | } |
|
395 | list($count) = $this->db->fetchRow($result); |
|
396 | ||
397 | return $count; |
|
398 | } |
|
399 | ||
400 | /** |
|
401 | * @得到城市 |
@@ 363-376 (lines=14) @@ | ||
360 | * @param object $criteria {@link CriteriaElement} to match |
|
361 | * @return int count of categories |
|
362 | */ |
|
363 | public function getCount($criteria = null) |
|
364 | { |
|
365 | $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('martin_group'); |
|
366 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
|
367 | $sql .= ' ' . $criteria->renderWhere(); |
|
368 | } |
|
369 | $result = $this->db->query($sql); |
|
370 | if (!$result) { |
|
371 | return 0; |
|
372 | } |
|
373 | list($count) = $this->db->fetchRow($result); |
|
374 | ||
375 | return $count; |
|
376 | } |
|
377 | ||
378 | /** |
|
379 | * @得到城市 |
@@ 309-322 (lines=14) @@ | ||
306 | * @param object $criteria {@link CriteriaElement} to match |
|
307 | * @return int count of categories |
|
308 | */ |
|
309 | public function getCount($criteria = null) |
|
310 | { |
|
311 | $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('martin_hotel_city'); |
|
312 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
|
313 | $sql .= ' ' . $criteria->renderWhere(); |
|
314 | } |
|
315 | $result = $this->db->query($sql); |
|
316 | if (!$result) { |
|
317 | return 0; |
|
318 | } |
|
319 | list($count) = $this->db->fetchRow($result); |
|
320 | ||
321 | return $count; |
|
322 | } |
|
323 | ||
324 | /** |
|
325 | * @得到城市 |
@@ 271-284 (lines=14) @@ | ||
268 | * @param object $criteria {@link CriteriaElement} to match |
|
269 | * @return int count of categories |
|
270 | */ |
|
271 | public function getCount($criteria = null) |
|
272 | { |
|
273 | $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('martin_hotel_promotions'); |
|
274 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
|
275 | $sql .= ' ' . $criteria->renderWhere(); |
|
276 | } |
|
277 | $result = $this->db->query($sql); |
|
278 | if (!$result) { |
|
279 | return 0; |
|
280 | } |
|
281 | list($count) = $this->db->fetchRow($result); |
|
282 | ||
283 | return $count; |
|
284 | } |
|
285 | ||
286 | /** |
|
287 | * @得到城市 |
@@ 276-289 (lines=14) @@ | ||
273 | * @param object $criteria {@link CriteriaElement} to match |
|
274 | * @return int count of categories |
|
275 | */ |
|
276 | public function getCount($criteria = null) |
|
277 | { |
|
278 | $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('martin_hotel_service'); |
|
279 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
|
280 | $sql .= ' ' . $criteria->renderWhere(); |
|
281 | } |
|
282 | $result = $this->db->query($sql); |
|
283 | if (!$result) { |
|
284 | return 0; |
|
285 | } |
|
286 | list($count) = $this->db->fetchRow($result); |
|
287 | ||
288 | return $count; |
|
289 | } |
|
290 | ||
291 | /** |
|
292 | * @get objects |
@@ 229-242 (lines=14) @@ | ||
226 | * @param object $criteria {@link CriteriaElement} to match |
|
227 | * @return int count of categories |
|
228 | */ |
|
229 | public function getCount($criteria = null) |
|
230 | { |
|
231 | $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('martin_hotel_service_type'); |
|
232 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
|
233 | $sql .= ' ' . $criteria->renderWhere(); |
|
234 | } |
|
235 | $result = $this->db->query($sql); |
|
236 | if (!$result) { |
|
237 | return 0; |
|
238 | } |
|
239 | list($count) = $this->db->fetchRow($result); |
|
240 | ||
241 | return $count; |
|
242 | } |
|
243 | ||
244 | /** |
|
245 | * @得到城市 |
@@ 402-415 (lines=14) @@ | ||
399 | * @param object $criteria {@link CriteriaElement} to match |
|
400 | * @return int count of categories |
|
401 | */ |
|
402 | public function getCount($criteria = null) |
|
403 | { |
|
404 | $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('martin_room'); |
|
405 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
|
406 | $sql .= ' ' . $criteria->renderWhere(); |
|
407 | } |
|
408 | $result = $this->db->query($sql); |
|
409 | if (!$result) { |
|
410 | return 0; |
|
411 | } |
|
412 | list($count) = $this->db->fetchRow($result); |
|
413 | ||
414 | return $count; |
|
415 | } |
|
416 | ||
417 | /** |
|
418 | * @get objects |
|
@@ 628-641 (lines=14) @@ | ||
625 | * @copyright 1997-2010 The Martin Group |
|
626 | * @author Martin <[email protected]> |
|
627 | * */ |
|
628 | public function GetRoomPriceCount() |
|
629 | { |
|
630 | $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('martin_room_price'); |
|
631 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
|
632 | $sql .= ' ' . $criteria->renderWhere(); |
|
633 | } |
|
634 | $result = $this->db->query($sql); |
|
635 | if (!$result) { |
|
636 | return 0; |
|
637 | } |
|
638 | list($count) = $this->db->fetchRow($result); |
|
639 | ||
640 | return $count; |
|
641 | } |
|
642 | ||
643 | /** |
|
644 | * @清空过期数据 |