El código de Jerkan te debería de funcionar, pero prueba esto para ver como se esta construyendo el SQL:
Código PHP:
$where = array();
if( $provincia != 0 )
{
$where[] = "provincia='$provincia'";
}
if( $categoria != 0 )
{
$where[] = "categoria ='$categoria '";
}
$where_sql = '';
if( count($where) > 0 )
{
$where_sql = ' WHERE ' . implode(' AND ', $where);
}
var_dump($where);
$sql1 = "SELECT * FROM datos_ofertas $where_sql";
echo $sql1;
Saludos.