Is it possible to only collect 25 records for each ID? When I insert the 26'th record for that ID I want to get rid of the oldest record for that ID? I did it once in ASP:queasy: and it looked like this:
strSQL = "SELECT * FROM list WHERE ID=1"
rs.open strSQL, conn, 1 , 1
If rs.recordcount > 24 Then
strSQL = "DELETE * FROM list WHERE Date IN(SELECT TOP 1 Date FROM list ORDER BY Date)"
conn.Execute (strSQL)
End If
strSQL = "INSERT INTO list ( ID, Point, Name ) VALUES (" & _
"'" & sqllize(Request("player1ID")) & "', '" & sqllize(Request("player1Point")) & "', '" & _
sqllize(Request("Player1Name")) & "')"
conn.Execute (strSQL)
rs.Close
Is this possible in PHP, and if yes, how?