mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[OQRS] Fix an error if you selected all for results in OQRS view
This commit is contained in:
@@ -502,18 +502,21 @@ class Oqrs_model extends CI_Model {
|
||||
$where = "AND $where";
|
||||
}
|
||||
|
||||
$limit = $searchCriteria['oqrsResults'];
|
||||
|
||||
$sql = "
|
||||
SELECT *, DATE_FORMAT(requesttime, \"%Y-%m-%d %H:%i\") as requesttime, DATE_FORMAT(time, \"%H:%i\") as time
|
||||
FROM oqrs
|
||||
INNER JOIN station_profile ON (oqrs.station_id=station_profile.station_id and station_profile.oqrs='1')
|
||||
WHERE station_profile.user_id = ?
|
||||
$where
|
||||
ORDER BY oqrs.id
|
||||
LIMIT $limit
|
||||
SELECT *, DATE_FORMAT(requesttime, \"%Y-%m-%d %H:%i\") as requesttime, DATE_FORMAT(time, \"%H:%i\") as time
|
||||
FROM oqrs
|
||||
INNER JOIN station_profile ON (oqrs.station_id=station_profile.station_id and station_profile.oqrs='1')
|
||||
WHERE station_profile.user_id = ?
|
||||
$where
|
||||
ORDER BY oqrs.id
|
||||
";
|
||||
|
||||
if ($searchCriteria['oqrsResults'] !== 'All') {
|
||||
$limit = $searchCriteria['oqrsResults'];
|
||||
$sql .= "LIMIT $limit";
|
||||
}
|
||||
|
||||
$data = $this->db->query($sql, $binding);
|
||||
|
||||
return $data->result('array');
|
||||
|
||||
Reference in New Issue
Block a user