Jump to content

please explain


narjis

Recommended Posts

in the following code I am unable to understand the purpose of @

function get_categories(){
//query database for a list of categories
$conn = db_connect();
$query ="select catid, catname from categories";
$result = @$conn->query($query);
if (!$result){
return false;
}
$num_cats = @$result->num_rows;
if($num_cats==0)
{
return false;
}
$result = db_result_to_array($result);
return false;
}
function db_result_to_array($result)
{
$res_array = array();
for ($count=0; $row = $result->fetch_assoc(); $count++){
	$res_array[$count] = $row;
	}

	return $res_array;
}

Link to comment
https://forums.phpfreaks.com/topic/237082-please-explain/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.