When I call a function to receive table from MySQL data transmission occurs between PHP and MySQL, or between Apache and MySQL and then Apache gives to PHP this table?
The simplest way to visalize the workflow :
Apache is only a webserver, it handles only a receiving/delivering the content generated by browser (sending HTTP requests) and php (outputing content for that requests)
Apache is just a web server and just serve pages ... The communications is between php and your database engine with the php mysql driver