tags:

views:

35

answers:

2

Hey there!

I'm trying to select next row from current id. How can i find out my current id?

$qry = mysql_query("SELECT performerid,pic0 FROM ".$table." WHERE id > $currentid ORDER BY id ASC LIMIT 1");
A: 

Select it?

$qry = mysql_query("SELECT id,performerid,pic0 FROM ".$table." WHERE id > $currentid ORDER BY id ASC LIMIT 1");

Mchl
A: 

MySQL doesn't work with any concept of current ID. If you're looking for the last inserted ID then it can be done via mysql_inserted_id function.

MartyIX