I believe this statement is vulnerable for injection, but am unsure.
Any help in this regard?
Thanks.
function CheckUserLogin($userName,$password)
{
    $sql="SELECT user_id 
         FROM users 
         WHERE user_name='".addslashes($userName)."' AND password ='".addslashes($password)."'";    
    $this->query($sql);
    if($this->movenext()>0)
    {
        return $this->col['user_id'];   
    }
    else 
    {
        return false;
    }
}
The query function is as such
function query($_query){
    list($usec, $sec) = explode(" ",microtime());
    $time_start  = ((float)$usec + (float)$sec);
    $this->query = $_query;
    $this->result = @mysql_query($_query, $this->link_id) or die("<b>error in sql query</b><br><pre>".$_query."</pre>.mysql error : <b>".mysql_error($this->link_id)."</b><p>");
    list($usec, $sec) = explode(" ",microtime());
    $time_end  =  ((float)$usec + (float)$sec);
    $time = $time_end - $time_start;
}
 
     
     
    