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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
fenway Posted October 22, 2007 Share Posted October 22, 2007 Don't number the results on INPUT. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.