Downloaded a couple of free php scripts for example Wordpress and Moodle to review how they structure there code etc. However, if searching through these two scripts I'm always not able to locate there database queries (choose, place, update)? What makes them so hidden and just how will i locate them?

They might really be produced with an ORM layer. That is an item that creates a question with the object techniques.

Have a look at /wordpress-includes/user.php in Wordpress for specific particulars from the implementation. You will notice SQL claims along with the code that processes them, such as this:

$user_nicename_check = $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->users WHERE user_nicename = %s AND user_login != %s LIMIT 1" , $user_nicename, $user_login));

In WordPress, they are in wp-db.php, funnily enough :) "Hiding" the reduced-level database calls from a lot of the code isolates the "business logic" in the database whenever possible.

This causes it to be simpler to create alterations in one without needing to re-code another, in order to support multiple database (or any other storage) back-finishes without needing to litter your code with inspections to determine what type of DB you are using.

If you want to determine what's happening inside a large open-source project, especially an OO one, it's most likely worth utilizing an editor/IDE which is capable of doing examining code and jumping to definitions, for example NetBeans. This frequently causes it to be simpler to follow along with the code through when you are reading through without needing to discover which class by which file has been known as (particularly when PHP autoloading is going on.)

There not hidden, there just designed in an OOP way!