@NuttySkunk
First check if it is available on your SERVER - I made this mistake when recently changing hosts 
@Michael Morris
Yes I agree that PDO is a better option if it is available on the SERVER;
If PDO is not available then a public function may simplify the process slightly :
PHP Code:
#===============
#
# function qq()
# parameter: SQL statement
# return
# success: valid resource
# otherwise: False
#
#===============
function qq( $sql )
{
$resource = mysql_query($sql);
$rows = mysql_num_rows( mysql_query($sql) );
return $rows ? $resource : NULL;
}
//=========================================
function index()
{
$sql = 'SELECT id FROM jokes WHERE id = 125';
// Maybe have resource with rows > 0
if( $qry = qq( $sql ) )
{
var_dump( $qry );
}
else
{
echo 'Yes we have no rows';
}
die;
Bookmarks