30 lines
808 B
PHP
30 lines
808 B
PHP
<?php
|
|
// application/models/Tournament_model.php
|
|
|
|
class Tournament_model extends CI_Model {
|
|
|
|
|
|
|
|
|
|
public function get_tournament($tournament_id) {
|
|
// Fetch tournament details from the database based on $tournament_id
|
|
$query = $this->db->get_where('tournament', array('tid' => $tournament_id));
|
|
return $query->row_array();
|
|
}
|
|
|
|
public function update_tournament($tournament_id, $data) {
|
|
// Update tournament details in the database
|
|
$this->db->where('tid', $tournament_id);
|
|
$this->db->update('tournament', $data);
|
|
}
|
|
|
|
// ... other methods ...
|
|
|
|
public function delete_tournament($tournamentId) {
|
|
// Perform deletion query here using $tournamentId
|
|
$this->db->delete('tournament', array('tid' => $tournamentId));
|
|
}
|
|
|
|
}
|
|
|
|
?>
|