PHP Code:
$query = $db->query_first( "select * from redirect where(url = '$drc_url')");
if ($query == false){
$hits = "1";
$query2 = "INSERT INTO redirect (url,hits) VALUES('$drc_url','$hits')";
} else {
$hitquery['hits'];
$query2 = "update redirect set hits = hits+1 where url = '$drc_url'";
}
$db->query_write($query2);
seems to work ok just want to make sure it looks ok, still learning =)
(got to run to the DMV to renew tags and lic almost my birthday, be back shortly)