  We examine the disc--jet connection in stellar mass and supermassive black
holes by investigating the properties of their compact emission in the X-ray
and radio bands. We compile a sample of ~100 active galactic nuclei with
measured mass, 5 GHz core emission, and 2-10 keV luminosity, together with 8
galactic black holes with a total of ~50 simultaneous observations in the radio
and X-ray bands. Using this sample, we study the correlations between the radio
(L_{R}) and the X-ray (L_{X}) luminosity and the black hole mass (M). We find
that the radio luminosity is correlated with {\em both} M and L_{X}, at a
highly significant level. In particular, we show that the sources define a
``fundamental plane'' in the three-dimensional (log L_{R},log L_{X},log M)
space, given by log L_{R}=(0.60^{+0.11}_{-0.11}) log L_{X}
+(0.78^{+0.11}_{-0.09}) log M + 7.33^{+4.05}_{-4.07}, with a substantial
scatter of \sigma_{R}=0.88. We compare our results to the theoretical relations
between radio flux, black hole mass, and accretion rate derived by Heinz and
Sunyaev (2003). Such relations depend only on the assumed accretion model and
on the observed radio spectral index. Therefore, we are able to show that the
X-ray emission from black holes accreting at less than a few per cent of the
Eddington rate is unlikely to be produced by radiatively efficient accretion,
and is marginally consistent with optically thin synchrotron emission from the
jet. On the other hand, models for radiatively inefficient accretion flows seem
to agree well with the data.
