Thanx for all the replys!
To AXSDENY:
The applicable table structure is below:
CREATE table gallery (
gallery_id int not null primary key auto_increment,
pic_name varchar (255),
image_thumb varchar (255),
image_large varchar (255));
To EDNARK:
I just tried the following:
print "<pre>";
print_r($result);
print "</pre>";
This produces "Resource id #6"?
Perhaps I can try and elaborate to make it clearer as to what my gallery is doing:
Say I have the following structure in my thumbnail gallery sorted alphabetically:
No 1: name=a, id=1
No 2: name=b, id=2
No 3: name=c, id=4
No 4: name=d, id=3
No 5: name=e, id=5
The following code, once a thumbnail image is selected, the large image format, produces the following results:
$result = @mysql_query("SELECT gallery_id FROM gallery WHERE pic_name >'$pic_name' ORDER BY pic_name LIMIT 1");
If I select "No 1" then select "Next" it goes correctly to "No 2", the second time I select "Next" it goes back to "No 1". Thereafter it stays on "No 1".
If I select "No 4" then select "Next" it goes correctly to "No 5", the second time I select "Next" it goes back to "No 1". Thereafter it stays on "No 1".
$result = @mysql_query("SELECT gallery_id FROM gallery WHERE pic_name >'$pic_name' LIMIT 1");
If I select "No 1,2,3 or 5" then select "Next" it goes to "No 4". Thereafter it stays on "No 4".
If I select "No 4" then select "Next" it goes correctly to "No 5", the second time I select "Next" it goes back to "No 4". Thereafter it stays on "No 4".
$result = @mysql_query("SELECT gallery_id FROM gallery WHERE gallery_id >'$gallery_id' LIMIT 1");
If I select "No 1" then select "Next" it goes to "No 2", then "No 4", then "No 3", then "No 5". So it correctly loops though numerically based on id-key.
HELP ME PLEASE!!??