mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
use sql bindings
This commit is contained in:
@@ -105,13 +105,13 @@
|
||||
}
|
||||
|
||||
function radio_status($id) {
|
||||
$sql = 'SELECT * FROM `cat` WHERE id = ' . $id . ' and user_id =' . $this->session->userdata('user_id');
|
||||
return $this->db->query($sql);
|
||||
$sql = 'SELECT * FROM `cat` WHERE id = ? AND user_id = ?';
|
||||
return $this->db->query($sql, array($id, $this->session->userdata('user_id')));
|
||||
}
|
||||
|
||||
function last_updated() {
|
||||
$sql = 'SELECT * FROM cat WHERE user_id =' . $this->session->userdata('user_id') . ' ORDER BY timestamp DESC LIMIT 1';
|
||||
return $this->db->query($sql);
|
||||
$sql = 'SELECT * FROM cat WHERE user_id = ? ORDER BY timestamp DESC LIMIT 1';
|
||||
return $this->db->query($sql, $this->session->userdata('user_id'));
|
||||
}
|
||||
|
||||
function delete($id) {
|
||||
|
||||
Reference in New Issue
Block a user