Personally, I use mysqli object orientated style....
<?php
session_start();
$postid = $_GET["id"];
if(!ctype_digit($postid)) {
header("Location: http://www.mysite.com");
}
include("caneck.inc");
$cxn = mysqli_connect($host,$user,$passwd,$dbname)
or die ("Couldn't connect");
$quer = "SELECT * FROM test WHERE eventid = $postid LIMIT 1";
// Run query
$rsult = $cxn->query($quer)
or die ("Couldn't execute: ".$cxn->error);
// cant recall if the following line is needed in this case. weird times that it is needed
$rsult->store_result();
// check row count
if($rsult->num_rows==0){header("Location: http://www.mysite.com");}
// fetch the row
$row = $rsult->fetch_assoc();
$rsult->free_result();
?>