dwdata 0 Light Poster

I have this code:

$query = "SELECT * FROM Ev_Songs where id_Event='$id_Event' Order by Pos";
$results = mysql_query($query) or die("Error performing query2");

will return a result like this:

Song_Title = "Song A", Pos = "2"
Song_Title = "Song B", Pos = "4"
Song_Title = "Song C", Pos = "7"
Song_Title = "Song D", Pos = "8"
Song_Title = "Song E", Pos = "10"

After I do this action, I want to RE-SERIALIZE the "Pos" field in this list starting with 1:

Song_Title = "Song A", Pos = "1"
Song_Title = "Song B", Pos = "2"
Song_Title = "Song C", Pos = "3"
Song_Title = "Song D", Pos = "4"
Song_Title = "Song E", Pos = "5"

What would the code look like to successfully do this?

Thanks much...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.