ничего не понял.... соединение с базой из отдельного файла
<?
$db = mysql_connect ("localhost","mmsgold_afisha","852456");
mysql_select_db ("mmsgold_afisha",$db);
mysql_query ("set character_set_client='cp1251'");
mysql_query ("set character_set_results='cp1251'");
mysql_query ("set collation_connection='cp1251_general_cs'");
?>
а вот начало моей страницы
<?php include ("blocks/db.php");?>
<?
$result2012 = mysql_query("SELECT `id`,`title_f`,`cat`,`mini_img,img`,`video`,`description`,`kinoteatrs`,`total_votes`,`total_value` FROM `mmsgold_films` ORDER BY id DESC",$db);
$myrow2012 = mysql_fetch_array($result2012);
$result2013 = mysql_query("SELECT id,title_f,cat,mini_img,img,video,description FROM mmsgold_films ORDER BY id DESC",$db);
$myrow2013 = mysql_fetch_array($result2013);
$result2014 = mysql_query("SELECT id,title_f,cat,mini_img,img,video,description FROM mmsgold_films WHERE cat = '1'or cat2 = '1' or cat3 = '1' ORDER BY id DESC",$db);
$myrow2014 = mysql_fetch_array($result2014);
$result2015 = mysql_query("SELECT id,title_f,cat,mini_img,img,video,description FROM mmsgold_films WHERE cat = '2'or cat2 = '2' or cat3 = '2' ORDER BY id DESC",$db);
$myrow2015 = mysql_fetch_array($result2015);
$result2016 = mysql_query("SELECT id,title_f,cat,mini_img,img,video,description FROM mmsgold_films WHERE cat = '3'or cat2 = '3' or cat3 = '3' ORDER BY id DESC",$db);
$myrow2016 = mysql_fetch_array($result2016);
?>
ошибку на каждый запрос выдает такую
Warning:
mysql_fetch_array() expects parameter 1 to be resource, null given in /home/m/mmsgold/public_html/index.php on line 14
Warning:
mysql_query() expects parameter 2 to be resource, null given in /home/m/mmsgold/public_html/index.php on line 16
Warning:
mysql_fetch_array() expects parameter 1 to be resource, null given in /home/m/mmsgold/public_html/index.php on line 17
Warning:
mysql_query() expects parameter 2 to be resource, null given in /home/m/mmsgold/public_html/index.php on line 19
Warning:
mysql_fetch_array() expects parameter 1 to be resource, null given in /home/m/mmsgold/public_html/index.php on line 20
Warning:
mysql_query() expects parameter 2 to be resource, null given in /home/m/mmsgold/public_html/index.php on line 22
Warning:
mysql_fetch_array() expects parameter 1 to be resource, null given in /home/m/mmsgold/public_html/index.php on line 23