When I do:
$q = \'insert into movies values(\"lion king\"); select * from movies;\';
$result = $db->query($q);
echo mysqli_num_rows($result);
$db->query('insert into movies values("lion king");');
$db->query('select * from movies;');
$q = 'insert into movies values("lion king")';
$result = $db->query($q);
$q = 'select * from movies';
$result = $db->query($q);
echo mysqli_num_rows($result);
You can use multi_query which is difficult to use, but in general no, you should only use one query at a time.
Don't confuse how you write 'queries' in the MySQL command line interface with how you do it with the API.
The MySQL command just wraps the API with something more shell like.
Using the API, you can really only do one query at a time. Of course the client side of the API could do something smart and interpret the semi-colons, splitting into multiple queries for you, but that probably just isn't that useful for enough people.
You need to use mysqli::multi_query.