it keeps going to the view-blog.php page because that is precisely what you have coded it to do:
if ($Recordset)
{
die("<META http-equiv=\"Refresh\" content=\"0;url=view-blog.php\">");
exit();
}
so if $Recordset is TRUE (which it would be if your query is run successfully) then you are echoing the meta refresh. remember, a result from a query will be boolean TRUE if the query was successfully run. it is perfectly logical for a query to be successful (TRUE) and return 0 records. you need to check how many rows were returned, not whether the query was successful or not.