ok, i want to delete any rows which are greater than 20. i thought i could use num_rows and that gives me the number of rows but how do i use that number to keep the number of rows at 20? i can't use auto_incretment id because it doesn't take account of deleted entries.
i want any new entries to be stored with the oldest deleted.
this is the structure of the script:
if($num_rows < "20"){
$query = "DELETE FROM table WHERE id = ''";
$result = mysql_query($query);
}
...you can see i'm stuck at the WHERE.
i hope this makes sense! thanks 😕