[eluser]quasiperfect[/eluser]
how can i add from mysql a incrementing value to each row i get from a query ?
i'm not talking about auto incrementing a existing value.
example :
Quote:select round((sum(votes.vote) / count(votes.id)),2) AS vote, count(votes.id) AS nrvotes, ("value"+1) as position FROM votes, users WHERE users.id = votes.person order by vote,nrvotes,position desc
where
"value" is not in any of the 2 tables is just the place in the results
this is just a example my query is much more complex
i want to add a value starting from 1 an incrementing it for each row.
i need to do this from inside the query not from php