|
Lines 84-95
sub search {
Link Here
|
| 84 |
my $orderby = dt_build_orderby($dt_params); |
84 |
my $orderby = dt_build_orderby($dt_params); |
| 85 |
|
85 |
|
| 86 |
my $limit; |
86 |
my $limit; |
| 87 |
if(defined $dt_params->{iDisplayStart} and defined $dt_params->{iDisplayLength}) { |
87 |
# In order to avoid sql injection |
| 88 |
# In order to avoir sql injection |
88 |
$dt_params->{iDisplayStart} =~ s/\D//g; |
| 89 |
$dt_params->{iDisplayStart} =~ s/\D//g; |
89 |
$dt_params->{iDisplayLength} =~ s/\D//g; |
| 90 |
$dt_params->{iDisplayLength} =~ s/\D//g; |
90 |
$dt_params->{iDisplayStart} //= 0; |
| 91 |
$limit = "LIMIT $dt_params->{iDisplayStart},$dt_params->{iDisplayLength}"; |
91 |
$dt_params->{iDisplayLength} //= 20; |
| 92 |
} |
92 |
$limit = "LIMIT $dt_params->{iDisplayStart},$dt_params->{iDisplayLength}"; |
| 93 |
|
93 |
|
| 94 |
my $query = join( |
94 |
my $query = join( |
| 95 |
" ", |
95 |
" ", |
| 96 |
- |
|
|