I think a derivation of the Bernoulli equation will help clarify things.
We begin with the Navier-Stokes equations
$$\frac{\partial \vec{u}}{\partial t}+\vec{u}\cdot \vec{\nabla}\vec{u} =-\frac{1}{\rho} \vec{\nabla} p +\nu \nabla^2 \vec{u},$$
where $\rho$ is the density, $p$ the pressure, and $\nu$ the kinematic viscosity. The advective term can be rewritten as
$$\vec{u}\cdot \vec{\nabla}\vec{u}=\vec{\nabla}(\frac{1}{2}\vec{u}\cdot \vec{u})-\vec{u}\times \vec{\omega}$$
where $\vec{\omega}=\vec{\nabla}\times \vec{u}$ is the vorticity.
We can now examine this equation under a variety of different assumptions.
For instance, let's assume the density is constant. Furthermore, we'll take the flow to be irrotational.
By definition this means
$$\vec{\nabla}\times\vec{u}=0\implies \vec{u}=\vec{\nabla}\phi$$
for $\phi$ a scalar function. Finally take the flow the to be inviscid (i.e. $\nu =0$).
With these assumptions the Navier-Stokes equations can be rewritten as
$$\vec{\nabla}\left(\frac{\partial \phi}{\partial t} + \frac{1}{2}\vec{u}\cdot\vec{u}+\frac{1}{\rho}p\right)=0.$$
This implies
$$\frac{\partial \phi}{\partial t} + \frac{1}{2}\vec{u}\cdot\vec{u}+\frac{1}{\rho}p=B(t)$$
where $B$ is just a function of time. This is usually absorbed into $\phi$, but there are examples when one needs to pay attention to the value of the Bernoulli head (eg Whitham 1962).
There are other simplifications (eg $u$ time independent, but possibly rotational) that one can also use to get a Bernoulli equation.
Let me know if you have any questions,
Nick