Hi all,

I'm doing this query and looping through the results:

$result_ID_ID=mysql_query($gallery_list_query) OR die(mysql_error());
 $counter=0;
 while ($queryresult_IDresult=mysql_fetch_array($result_ID_ID))
 {
  $result_array['$counter']=$queryresult_IDresult;
  
  if ($result_array['$counter']['galleryID']==$galleryID)
  {
  $current_number=$counter+1;
  $current_item=current(($result_array));
  $next_item=next($result_array);///////this doesn't seem te work.
}
  $counter=$counter+1;
 }

When it has found the right record with ID number $galleryID I also need the previous 
record and the next record. Anybody has any clue how to do this?

thx Wilbert



-------------------------
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-------------------------

Reply via email to