WordPressMVC

  1. Get Started
  2. Documentation
  3. Tutorials
  4. Blog
  1. Documentation
  2. Tutorials
v1.0.8 Login
  • Blog
  • Download
  • Get Started
  • The Basics
    • Ayuco
    • Main Class
    • Configuration
  • Hooks
    • Actions
    • Filters
    • Widgets
    • Shortcodes
  • MVC
    • Models
    • Post Models
    • Option Models
    • Term Models
    • User Models
    • Views
    • Controllers
  • Resources
    • Assets
    • Styles
    • Scripts
  • Advanced
    • Request
    • Response
    • Localization
    • Cache
    • Logger
    • Database
    • Testing
    • Deployment
    • Functions
    • Add-ons

Database

Last updated: January 12, 2020
The framework does not include a database package/library out-of-the-box.

Query Builder

Run the following composer command to include in your project our database query builder and a solution for data models based on custom data tables.

composer require 10quality/wp-query-builder

WP Query Builder is our database (SQL based) package solution that allows building complex database queries, has model support on custom data tables and it has plenty of customization hooks.

Documentation

Read the extended documentation here.

Code Samples

Database query builder sample

$results = $builder::create()
    ->select( 'ID' )
    ->select( 'post_title' )
    ->from( 'posts' )
    ->where( [
        'post_status' => 'publish',
        'post_type'   => $post_type, // Will be sanitized
    ] )
    ->get();

© 2023 10 Quality Studio . All rights reserved.
Search in: