how to check current position in mysql

spiderpg

New Member
how can i check current number in mysql where....my query is \[code\] $aid = 16; $get_prev_photo = mysql_query("SELECT * FROM photos WHERE album_id='$aid' AND pic_id<'$picid' ORDER BY pic_id LIMIT 1"); $get_next_photo = mysql_query("SELECT * FROM photos WHERE album_id='$aid' AND pic_id>'$picid' ORDER BY pic_id LIMIT 1");\[/code\]while i am getting current photo with following query\[code\]$photo = mysql_query("SELECT * FROM photos WHERE pic_id='$picid' LIMIT 1");\[/code\]and getting total photos in album with following query\[code\]$photos = mysql_query("SELECT * FROM photos WHERE album_id='$aid'");$total_photos = mysql_num_rows($photos);\[/code\]now i want to check where i am and show it as Showing 1 of 20, showing 6 of 20 and so on...now i want to check where i am actually...
 
Back
Top