[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: Помогите по ошибке
zaBMF
Такая вот ошибка( ошибку выделил красным в коде


Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in Z:\home\shop\www\view_cat.php on line 81

Сам код:
<?php

include("include/db_connect.php");
include("functions/functions.php");

$cat =clear_string($_GET["cat"]);
$type =clear_string($_GET["type"]);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<
head>
<
meta http-equiv="content-type" content="text/html; charset=windows-1251" />

<
link href="css/reset.css" rel="stylesheet" type="text/css" />
<
link href="css/style.css" rel="stylesheet" type="text/css" />
<
script type="text/javascript" src="/js/jquery-1.8.2.min.js"></script>
<
script type="text/javascript" src="/js/jcarousellite_1.0.1.js"></script>
<
script type="text/javascript" src="/js/shop-script.js"></script>
<
title>Интернет-Магазин Бетонных Конструкций</title>
</
head>
<
body>

<
div id="block-body">

<?php
include("include/block-header.php");
?>
<div id="block-right">
<?php
include("include/block-category.php");
include("include/block-news.php");
?>

</div>

<
div id="block-content">

<
div id="block-sorting">

<
p id="nav-breadcrumbs"><a href="index.php">Главная страница</a> \<span> Все товары</span></p>



</
div>

<
ul id="block-tovar-grid">

<?php

if (!empty($cat) && !empty($type))
{
$querycat = "AND brand='$cat' AND type_tovara='$type'";
$catlink = "cat=$cat&";

}else
{

if (!empty($type))
{
$querycat = "AND type_tovara='$type'";
}else
{
$querycat = "";
}

if (!empty($cat))
{
$catlink = "cat=$cat&";
}else
{
$catlink = "";
}


}


$result = mysql_query("SELECT * FROM table_products WHERE visible='1' $querycat",$link);
[
color=red]
if(mysql_num_rows($result)>0)[/color]
{
$row=mysql_fetch_array($result);
do
{




if ($row["image"] != "" && file_exists("./images/polusfera/".$row["image"]))
{
$img_path = './images/polusfera/'.$row["image"];
$max_width = 200;
$max_height = 200;
list($width, $height) = getimagesize($img_path);
$ratioh = $max_height/$height;
$ratiow = $max_width/$width;
$ratio = min($ratioh, $ratiow);
$width = intval($ratio*$width);
$height = intval($ratio*$height);
}else
{
$img_path = "/images/no-image.png";
$width = 110;
$height = 200;
}



echo '

<li>
<div class="block-images-grid">
<img src="'
.$img_path.'" width ="'.$width.'" height="'.$height.'" />
</div>
<p class="style-title-grid"><a href="">'
.$row["title"].'</a></p>
<ul class="reviews-and-counts-grid">
<li><img src="/images/eye-icon.png" /><p>0</p></li>
<li><img src="/images/comment-icon.png" /><p>0</p></li>
</ul>
<a class="add-cart-style-grid" ></a>
<p class="style-price-grid" ><strong>'
.$row["price"].'</strong> руб.</p>
<div class="mini-features">
'
.$row["mini_features"].'
</div>
</li>
'
;
}
while ($row=mysql_fetch_array($result));
}
?>
</ul>

</
div>
<?php
include("include/block-footer.php");
?>


</div>



</
body>
</
html>

Помогите пожалуйста!(можете дать реквизиты Qiwi-отблагодарю)Сам новичек в этом деле.

Я уже целый день мучаюсь,если и дадут ответ то это какой-нибудь учебник.В гугле ошибка встречается,но по-существу ответа нет
Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2024 Invision Power Services, Inc.