Fatal error: Call to a member function query()on a non-object
===

i used the below code ,which generates an fatal error .

    mysql_connect("localhost", "", "") or die(mysql_error());
    mysql_select_db("") or die(mysql_error());

    $sel12 = $db->query("SELECT * FROM ".SPICE." WHERE status=1 ORDER BY spice_id desc LIMIT 0 , 9"); 
    if(mysql_num_rows($sel12)>0){
    $m=0;
    ?>
    <?php 
    while($row12=mysql_fetch_array($sel12)){ ?>
	
    <a href="<?php echo SITE; ?>air/<?php echo $row12['spice_id']; ?>/<?php echo $m+1; ?>" title="<?php echo $row12['title']; ?>"></a>
    <?php $m++; } ?>
    <?php } ?>
 

Fatal error: Call to a member function query() on a non-object in /home/tolly25/public_html/slideshow.php on line 49
