$DBConnect = @mysqli_connect("localhost", "username", "password")
$query = "DELETE FROM hitcounter";
$query = "ALTER TABLE hitcounter AUTO_INCREMENT=0";
// I made a hit counter which displays hits on page
// Only thing i have left is the reset button that switch the pages hits to 0 after the clear button is pressed
// I am unable to execute the query
You can use:
$query = "TRUNCATE TABLE hitcounter;"
Which will delete all rows and reset the auto_increment to 0 as well in only one query.
This does not work for InnoDB tables as long they have a relationship