Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

mysql_fetch_array() error

$
0
0

hi guys,  i can't resolve this error "The requested URL /<br /><b>Warning</b>: mysql_fetch_array() expects parameter 1 to be resource, boolean given in <b>/home/nerdto/greenfair/include/bit_functions.inc.php</b> on line <b>33</b><br />//auction/ was not found on this server."

 

where is the problem?

thanks

 

function getStart($limit)

{
if((!isset($_GET['page'])) || ($_GET['page'] == "1")) {
        $start = 0;
        $_GET['page'] = 1;
     } else {
        $start = ($_GET['page']-1) * $limit;
     }
     return $start;
}
function get_cat_name($cat)
{
$rec=mysql_fetch_array(mysql_query("select name,top from add_category where id=$cat"));
 
 if($rec['top'] > 0)
 {
return get_cat_name($rec['top'])."/".str_replace(" ","-",trim($rec['name']));
 }
 else
 return str_replace(" ","-",trim($rec['name']));
 
}

 


Viewing all articles
Browse latest Browse all 13200

Trending Articles