@@ 563-577 (lines=15) @@ | ||
560 | * @param $auction_id |
|
561 | * @return array |
|
562 | */ |
|
563 | public function GetAuctionRooms($auction_id) |
|
564 | { |
|
565 | global $xoopsDB; |
|
566 | if (!$auction_id) { |
|
567 | return $auction_id; |
|
568 | } |
|
569 | $sql = 'SELECT a.*,r.*,rt.room_type_info,h.* FROM ' . $xoopsDB->prefix("martin_auction_room") . ' a '; |
|
570 | $sql .= ' INNER JOIN ' . $xoopsDB->prefix('martin_room') . ' r ON ( r.room_id = a.room_id ) '; |
|
571 | $sql .= ' INNER JOIN ' . $xoopsDB->prefix('martin_room_type') . ' rt ON ( r.room_type_id = rt.room_type_id ) '; |
|
572 | $sql .= ' INNER JOIN ' . $xoopsDB->prefix('martin_hotel') . ' h ON ( r.hotel_id = h.hotel_id ) '; |
|
573 | $sql .= ' WHERE a.auction_id = ' . $auction_id; |
|
574 | ||
575 | //echo $sql; |
|
576 | return $this->GetRows($sql); |
|
577 | } |
|
578 | ||
579 | /** |
|
580 | * @add user auction bid |
@@ 541-555 (lines=15) @@ | ||
538 | * @param $group_id |
|
539 | * @return array |
|
540 | */ |
|
541 | public function GetGroupRooms($group_id) |
|
542 | { |
|
543 | global $xoopsDB; |
|
544 | if (!$group_id) { |
|
545 | return $group_id; |
|
546 | } |
|
547 | $sql = 'SELECT gr.*,r.*,rt.room_type_info,h.* FROM ' . $xoopsDB->prefix("martin_group_room") . ' gr '; |
|
548 | $sql .= ' INNER JOIN ' . $xoopsDB->prefix('martin_room') . ' r ON ( r.room_id = gr.room_id ) '; |
|
549 | $sql .= ' INNER JOIN ' . $xoopsDB->prefix('martin_room_type') . ' rt ON ( r.room_type_id = rt.room_type_id ) '; |
|
550 | $sql .= ' INNER JOIN ' . $xoopsDB->prefix('martin_hotel') . ' h ON ( r.hotel_id = h.hotel_id ) '; |
|
551 | $sql .= ' WHERE gr.group_id = ' . $group_id; |
|
552 | ||
553 | //echo $sql; |
|
554 | return $this->GetRows($sql); |
|
555 | } |
|
556 | ||
557 | /** |
|
558 | * @add user join group |