I want to simply fetch data from database but it shows me database selection error like:- "4 is not a valid MySQL-Link resource" or "No database selected"


mysql_select_db($database_conn,$conn);
$Query="SELECT * FROM `assessment_master` WHERE `module_id`='".$module_id."' AND `session_id`='".$session_id."' AND `***_seq`>=".$stPg." AND `***_seq`<=".$enPg."";

$b = mysql_query($Query);
if(!isset($b)){
echo mysql_error();
}

/** code for connection file is **/
$conn=mysql_connect("localhost","username","password") or die("connectin fail");
$db=mysql_select_db("db_name",$conn);
my