jefargrafx
Instructor
I'm using the list (like array) to pull data and make a page.
for ($i=0;$i<$count;$i++) {
list($picid,$propid,$desc,$picSortOrder) = db_fetchrow($query);
echo "picid= ".$picid." picSortOrder= ".$picSortOrder."<br>";
}
I then pass this info to a script to change the display order of some photo. MOving them up or down based on the picsortorder. My trouble come in when trying to know the picid or the photo above or below the one I'm moving.
I need to update the database to switch position.
list will make a list say:
1
2
3
4
I want to change 4 and 3, but sometime 3 and be 2 or 1 and I need to know how to get LIST to tell me the varable above 4 reguardless.
hope I didn't confuse ya
any help would be great
thanks
jef
for ($i=0;$i<$count;$i++) {
list($picid,$propid,$desc,$picSortOrder) = db_fetchrow($query);
echo "picid= ".$picid." picSortOrder= ".$picSortOrder."<br>";
}
I then pass this info to a script to change the display order of some photo. MOving them up or down based on the picsortorder. My trouble come in when trying to know the picid or the photo above or below the one I'm moving.
I need to update the database to switch position.
list will make a list say:
1
2
3
4
I want to change 4 and 3, but sometime 3 and be 2 or 1 and I need to know how to get LIST to tell me the varable above 4 reguardless.
hope I didn't confuse ya
any help would be great
thanks
jef