Error when displaying records from database

getting error to display the records .

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource

<?
include('admin/includes/db.php');
include "dbase/cDatabase.php";
include "dbase/dbstring.php";
$cDB = new cDatabase($dbase_host_name, $dbase_user_name, $dbase_pass_word, $dbase_db_name);

?>


<html>
<head>
<style>
.styled-select {
   width: 220px;
   overflow: hidden;
   background: #ddd;
}
</style>

<style type="text/css">
.background_button {
    background-image: url(../jpeg/background_button.png);
    background-repeat: no-repeat;
}
</style>

<link href="css/netcom.css" rel="stylesheet" type="text/css">    
<script type="text/javascript" src="list.js"></script>

<script type="text/javascript">
    
    var cities = []; 
cities["AUTOMOTIVE"] = ["FOUR WHEELER","TWO WHEELER"];
    cities["CONSUMER"] = ["HOME / SHOP","CHILD / ASSET",];
    cities["INDUSTRIAL"] = ["AUTO TRUCK"];
        
    function fillSelect(nValue,nList){

        nList.options.length = 1;
        var curr = cities[nValue];
        for (each in curr)
            {
             var nOption = document.createElement('option'); 
             nOption.appendChild(document.createTextNode(curr[each])); 
             nOption.setAttribute("value",curr[each]);              
             nList.appendChild(nOption); 
            }
    }

</script>
<script type="text/javascript"><!--
var lastDiv = "";
function showDiv(divName) {
    // hide last div
    if (lastDiv) {
        document.getElementById(lastDiv).className = "hiddenDiv";
    }
    //if value of the box is not nothing and an object with that name exists, then change the class
    if (divName && document.getElementById(divName)) {
        document.getElementById(divName).className = "visibleDiv";
        lastDiv = divName;
    }
}
//-->
</script>
</head>
<body>

    <table width="754" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    
  <th scope="col" height="6">&nbsp;</th>
  </tr>
  <tr>
    <td height="0" ></td>
  </tr>
  <tr>
    <td height="0">&nbsp;</td>
  </tr>
   
     
  <tr>
    <td height="0"><table width="756" border="0" cellspacing="0" cellpadding="0" height="350">
      <tr>
        <th scope="col" width="">&nbsp;</th>
        <th colspan="" rowspan="" scope="col" valign="top"><table width="756" border="0" cellspacing="0" cellpadding="0">
          <tr>
          
          </tr> <tr>
                <td height="10"></td>
                <td class="text-heading"><form action="support.php"  method="post"  id="form1">
                 <select name="cname" onchange="fillSelect(this.value,this.form['cities'])">
                <option value="">Select Category</option>
                <option value="AUTOMOTIVE">AUTOMOTIVE</option>
                <option value="CONSUMER">CONSUMER</option>
                <option value="INDUSTRIAL">INDUSTRIAL</option>
            </select>
            
            
             <select name='cities' onChange="">
                <option value="">Select Product</option>
            </select> <input type="submit" value="Submit"></input></td>
             
              </tr>
             
          <tr>
            <td height="300" colspan="3" valign="top"><table width="273" border="0" cellspacing="0" cellpadding="0" height="280" class="background_button">
              <tr>
                <td width="37" height="3"></td>
                
                <td width="37"></td>
              </tr>
              <tr>
               
                <td class="text-heading"><?php


    $cname=$_POST['cname'];
                    $pname=$_POST['cities'];


    $logoinfo = $cDB->ExecuteReader("select id,banner,url from mydreamh_banner where category='$pname'  ");
    $total_logos = mysql_num_rows($logoinfo);
    if($total_logos != 0)
    {
        $imgid = 0;
    ?>
    
    <?php
        while($logo_details = mysql_fetch_assoc($logoinfo))

        {
        echo '<br>';
        if($logo_details != '')
        {
            echo "<a href=".$logo_details." target='_blank'>";
        }
        
        ?>



   <a href="<?php echo $logo_details['url'];?>" target='_blank'><img style="visibility: visible;" src="<?php echo $logo_details['banner'];?>" alt="s"  height="29" width="199" align="middle" border="0"></a>
    <?php
    echo "</a>";
    $imgid = $imgid + 1;

    
    ?>
    
    <?php 
    }
    
}
else
{
    echo '<tr>
<td align=center>NO RESULTS</td>
</tr>';
}    
?></td>
              </tr>
             
             
               </table></td>
          
            <td colspan="" valign="top"><table width="0" border="0" cellspacing="0" cellpadding="0" height="280"     >
          
         
              
             
             
             
               </table>
          
            <td valign="top" align="left"  valign="top" style="padding-left:0px; ">
            

    <? 
// Error rise here
                    
                if ($pname == NULL )
                {
                }
                else
                {

                    $sel_admin_user="select * from news1 where cname='$cname' and pname='$pname'  order by id ASC";

       $query_exe=mysql_query($sel_admin_user);
       $loop=1;
       while($res_query=mysql_fetch_object($query_exe))
       {
       
                ?>
                
                <span class="text-faq-bold"><a href="javascript:ExpandItem('detail009<?=$loop;?>');" name="xdetail008" id="xdetail008" class="signup"xc><?=$loop;?>. <?=$res_query->title;?></font></a></span>
<div id="detail009<?=$loop;?>" style="display: none; padding-left:16px;"><font class="text-faq-normal"> <?=$res_query->desc;?></font></div>
<br>
                
                <? $loop++;} 
                }
                
            
                
             ?>
                
            
            </td>
          </tr>
        </table></th>
        <th scope="col" width="9">&nbsp;</th>
      </tr>
      
 
      
    
    
   
    </table></td>
  </tr>
 
    



        
            </form>
            
            </body>
</html>

Check the query outside of PHP as the error indicates that an query has failed