Yo lo haría así:
Código PHP:
$where = array();
if( $provincia != 0 )
{
$where[] = "provincia='$provincia'";
}
if( $categoria != 0 )
{
$where[] = "categoria ='$categoria '";
}
if( !empty($where) )
{
$where_sql = implode(' AND ', $where);
}
$sql1 = "SELECT * FROM datos_ofertas $where_sql";
Un saludo