Database and WordPress. The wpdb object. PHP and MySQL queries in custom pages.