Jump to content

SELECT incrementing value


neoform

Recommended Posts

is there a way to do something like this?

 

SELECT val1, val2, an_incrementing_value FROM table1 LIMIT 100

 

where the incrementing value starts at 0 and goes up to 99 (as a way to number the results).

 

I'm using this in an INSERT SELECT, so the incrementing field needs to be done by mysql.

Link to comment
https://forums.phpfreaks.com/topic/74169-select-incrementing-value/
Share on other sites

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.