magic framework の開発
| Revision | 495aa8f12e528b2bc4935e786aee8dc4f4a98625 (tree) |
|---|---|
| Time | 2011-12-16 12:10:49 |
| Author | taka451213 <taka451213@hotm...> |
| Commiter | taka451213 |
Signed-off-by: taka451213 <taka451213@hotmail.com>
| @@ -1,45 +1,45 @@ | ||
| 1 | -<?php | |
| 2 | -final class IndexDao extends Dao { | |
| 3 | - public function __construct() { | |
| 4 | - } | |
| 5 | - public function selectTournament() { | |
| 6 | - $stmt = " select user_no,"; | |
| 7 | - $stmt .= " tournament_no,"; | |
| 8 | - $stmt .= " tournament_name,"; | |
| 9 | - $stmt .= " main_image,"; | |
| 10 | - $stmt .= " from ms_tournament"; | |
| 11 | - $stmt .= " where start_flag = 1"; | |
| 12 | - $stmt .= " order by status"; | |
| 13 | - $res = $this->pdo->prepare($stmt); | |
| 14 | - $res->execute(); | |
| 15 | - return $res->fetchAll(PDO::FETCH_ASSOC); | |
| 16 | - } | |
| 17 | -// public function deleteTournament($userNo, $tournamentNo) { | |
| 18 | -// $stmt = " delete from ms_tournament"; | |
| 19 | -// $stmt .= " where user_no = ?"; | |
| 20 | -// $stmt .= " and tournament_no = ?"; | |
| 21 | -// $res = $this->pdo->prepare($stmt); | |
| 22 | -// $res->execute(array($userNo, $tournamentNo)); | |
| 23 | -// return $res->rowCount(); | |
| 24 | -// } | |
| 25 | -// public function updateTournament($userNo, $tournamentNo) { | |
| 26 | -// $stmt = " update ms_tournament"; | |
| 27 | -// $stmt .= " set status = 1"; | |
| 28 | -// $stmt .= " where user_no = ?"; | |
| 29 | -// $stmt .= " and tournament_no = ?"; | |
| 30 | -// $stmt .= " and status = 0"; | |
| 31 | -// $res = $this->pdo->prepare($stmt); | |
| 32 | -// $res->execute(array($userNo, $tournamentNo)); | |
| 33 | -// return $res->rowCount(); | |
| 34 | -// } | |
| 35 | -// public function selectImage($userNo, $tournamentNo) { | |
| 36 | -// $stmt = " select main_image"; | |
| 37 | -// $stmt .= " from ms_tournament"; | |
| 38 | -// $stmt .= " where user_no = ?"; | |
| 39 | -// $stmt .= " and tournament_no = ?"; | |
| 40 | -// $res = $this->pdo->prepare($stmt); | |
| 41 | -// $res->execute(array($userNo, $tournamentNo)); | |
| 42 | -// return $res->fetchColumn(); | |
| 43 | -// } | |
| 44 | -} | |
| 1 | +<?php | |
| 2 | +final class IndexDao extends Dao { | |
| 3 | + public function __construct() { | |
| 4 | + } | |
| 5 | + public function selectTournament() { | |
| 6 | + $stmt = " select user_no,"; | |
| 7 | + $stmt .= " tournament_no,"; | |
| 8 | + $stmt .= " tournament_name,"; | |
| 9 | + $stmt .= " main_image,"; | |
| 10 | + $stmt .= " from ms_tournament"; | |
| 11 | + $stmt .= " where start_flag = 1"; | |
| 12 | + $stmt .= " order by status"; | |
| 13 | + $res = $this->pdo->prepare($stmt); | |
| 14 | + $res->execute(); | |
| 15 | + return $res->fetchAll(PDO::FETCH_ASSOC); | |
| 16 | + } | |
| 17 | +// public function deleteTournament($userNo, $tournamentNo) { | |
| 18 | +// $stmt = " delete from ms_tournament"; | |
| 19 | +// $stmt .= " where user_no = ?"; | |
| 20 | +// $stmt .= " and tournament_no = ?"; | |
| 21 | +// $res = $this->pdo->prepare($stmt); | |
| 22 | +// $res->execute(array($userNo, $tournamentNo)); | |
| 23 | +// return $res->rowCount(); | |
| 24 | +// } | |
| 25 | +// public function updateTournament($userNo, $tournamentNo) { | |
| 26 | +// $stmt = " update ms_tournament"; | |
| 27 | +// $stmt .= " set status = 1"; | |
| 28 | +// $stmt .= " where user_no = ?"; | |
| 29 | +// $stmt .= " and tournament_no = ?"; | |
| 30 | +// $stmt .= " and status = 0"; | |
| 31 | +// $res = $this->pdo->prepare($stmt); | |
| 32 | +// $res->execute(array($userNo, $tournamentNo)); | |
| 33 | +// return $res->rowCount(); | |
| 34 | +// } | |
| 35 | +// public function selectImage($userNo, $tournamentNo) { | |
| 36 | +// $stmt = " select main_image"; | |
| 37 | +// $stmt .= " from ms_tournament"; | |
| 38 | +// $stmt .= " where user_no = ?"; | |
| 39 | +// $stmt .= " and tournament_no = ?"; | |
| 40 | +// $res = $this->pdo->prepare($stmt); | |
| 41 | +// $res->execute(array($userNo, $tournamentNo)); | |
| 42 | +// return $res->fetchColumn(); | |
| 43 | +// } | |
| 44 | +} | |
| 45 | 45 | // EOF. |
| \ No newline at end of file |