neoform Posted October 21, 2007 Share Posted October 21, 2007 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 More sharing options...
Simon Moon Posted October 21, 2007 Share Posted October 21, 2007 From your example, i assume you want that for printing it out. I would simply do that in the script, by counting up the numbers and not in the database. Link to comment https://forums.phpfreaks.com/topic/74169-select-incrementing-value/#findComment-374948 Share on other sites More sharing options...
fenway Posted October 22, 2007 Share Posted October 22, 2007 Don't number the results on INPUT. Link to comment https://forums.phpfreaks.com/topic/74169-select-incrementing-value/#findComment-375448 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.