Thanks for query,
18 hours are long time you keep your child with vomiting
It is possible that by this time he might developed dehydration
Now do not wait more and take him to ER for IV fluid therapy
First we should correct dehydration and then the cause i.e infection.
Ok and bye.