Hello!
I'm have minor problems with a script.
This is a image gallery with the pictures names stored in a mySQL database.
I have category id and picture id.
To create prev and next link I want to check the category and see if there is a lower picture id or greater.
This I do with:
$sql= mysql_query("SELECT imgID FROM album WHERE categoryID = $categoryID and pictureID < $pictureID");
and
PHP]$sql= mysql_query("SELECT imgID FROM album WHERE categoryID = $categoryID and pictureID > $pictureID");[/code]
This works for the other direction, but either one takes me either to the beginning or the end(I've tried million ways of making this work for both directions.)
This does not really make sense, why it works for one direction and not the other, so if someone could explain or suggst to me I'd appreciate it.
with regards
promazin
http://www.this.is/promazin