Skip to content
Snippets Groups Projects
Commit af0d7cf5 authored by VladimirCherkasov's avatar VladimirCherkasov
Browse files

minor changes in support model

parent affd5d77
Branches
Tags
No related merge requests found
/**
* Created by ami96_000 on 02.07.2015.
*/
$(function(){
var faculty=$('#faculty');
faculty.change(function () {
alert(
faculty.find('option:selected').val());
});
});
\ No newline at end of file
......@@ -25,10 +25,13 @@ class Model_Support extends Model
->execute()->get('Num');
}
public static function getReports($userID) {
$query = 'CALL `GetRequests`(0, 100, :account, "all")';
public static function getReports($userID, $offset = 0, $count = 1000, $statusFilter = 'all') {
$query = 'CALL `GetRequests`(:offset, :count, :account, :filter)';
return DB::query(Database::SELECT, $query)
->param(':account', $userID)
->param(':offset', $offset)
->param(':count', $count)
->param(':filter', $statusFilter)
->execute()->as_array();
}
}
......@@ -11,8 +11,7 @@
<td>{{ ind }} </td>
<td>{{ req.ID }}</td>
<td>{{ req.Title }}</td>
<td>{{ req.Description|raw}}</td>
<td>{{ req.Status}}</td>
</tr>
{% endfor %}
</table>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment