View Single Post
Old 06-19-2008, 10:37 PM   #6 (permalink)
Kalle
The Frequenter
Zend Certified 
 
Join Date: Sep 2007
Location: Denmark
Posts: 352
Thanks: 8
Kalle is on a distinguished road
Default

My version:

PHP Code:
<?php
    
if(!isset($num) || !is_numeric($num) || $num 0)
    {
        
$num 'notset';
    }
    else
    {
        
/** Force integer */
        
$num = (integer) $num;
    }

    
$query = @mysql_query('SELECT * FROM ... WHERE ... = $num');

    if(!
$query || !@mysql_num_rows($query))
    {
        
/** No page set or no results, halt execution */
    
}

    
/** Continue */
?>
Hope it helps ;)
__________________
Send a message via MSN to Kalle Send a message via Skype™ to Kalle
Kalle is offline  
Reply With Quote