List unsorted first time in
Posted: Sun Jul 10, 2011 12:16 pm
This is a follow up to my previous question. In that question my index.php included:
which Steve suggested I change to:
Now, I don't know if this was true before and I just hadn't noticed, but my database (which opens with the list view) isn't sorted. If I go to any other view and come back to List, then it's sorted by dog_name as I would expect.
Does anyone know why it isn't sorted on initial opening?
Thanks.
- Code: Select all
if ( !isset( $_REQUEST['-sort'])){
$_REQUEST['-sort'] = 'dog_name asc';
$_GET['-sort'] = 'dog_name' asc';
}
which Steve suggested I change to:
- Code: Select all
if ( !$_POST and !isset($_GET['-sort']) ){
$_GET['-sort'] = $_REQUEST['-sort'] = 'dog_name asc';
}
Now, I don't know if this was true before and I just hadn't noticed, but my database (which opens with the list view) isn't sorted. If I go to any other view and come back to List, then it's sorted by dog_name as I would expect.
Does anyone know why it isn't sorted on initial opening?
Thanks.