By drupalfriend123 on
Hi,
We have lot of files and folders sitting on webserver. We have settings.php file where we keep database url/credentials to access database. We see all contents in the front end by getting date from db.
My question is how drupal files communicate with the database so contents can display at URL level? Is there drupal driver plays a middle man role for read/write to/from db? If you can provide some info, it would be great. I like to learn it in details.
Thanks.
Comments
Hi drupalfriend123,
Hi drupalfriend123,
The connection between database and site is always persistant. We need to write direct only database query's in module file.
Thanks
In other words, there is
In other words, there is direct communication between site and db. That means you write the sql query in the module files and db return back to site?
_
Drupal has it's own API for working with the database:
https://www.drupal.org/developing/api/database
The API in turn uses PDO to facilitate the actual communication:
http://php.net/manual/en/intro.pdo.php
- Brendan
This is what I was looking
This is what I was looking for. Thanks.