Removing these lines causes ```$sql_limit_to_append``` to be undefined further down. Consider re-adding this, to avoid PHP Notices:

```
$sql_limit_to_append = '';
```