Jump to content

Increment mysql


dreamwest

Recommended Posts

How can i  create a query that selects (increments) the next row

 

$next = $_GET['next']; 
$next = $next +1; //increment to the next row
"SELECT * FROM red WHERE approve='1' and id='{$next}' "

 

This is ok if the are no missing ids in the table

 

1

2

3

4

5

6

 

But will create a problem with this

 

1

2

5

6

Link to comment
https://forums.phpfreaks.com/topic/179948-increment-mysql/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.