PHP Classes

File: Config/Queries/ClientDB/GET/Category.php

Recommend this page to a friend!
  Classes of Ramesh Narayan Jangid   PHP Microservices Framework   Config/Queries/ClientDB/GET/Category.php   Download  
File: Config/Queries/ClientDB/GET/Category.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Microservices Framework
Setup microservices apps with configuration arrays
Author: By
Last change: Refactor
Date: 17 days ago
Size: 1,756 bytes
 

Contents

Class file image Download
<?php
namespace Microservices\Config\Queries\ClientDB\GET;

//return represents root for hierarchyData
use Microservices\App\Constants;

return [
   
'query' => "SELECT * FROM `category` WHERE __WHERE__",
   
'__WHERE__' => [
       
'is_deleted' => ['custom', 'No'],
       
'parent_id' => ['custom', 0]
    ],
   
'mode' => 'multipleRowFormat',//Multiple rows returned.
   
'subQuery' => [
       
'sub' => [
           
'query' => "SELECT * FROM `category` WHERE __WHERE__",
           
'__WHERE__' => [
               
'is_deleted' => ['custom', 'No'],
               
'parent_id' => ['hierarchyData', 'return:id'],
            ],
           
'mode' => 'multipleRowFormat',//Multiple rows returned.
           
'subQuery' => [
               
'subsub' => [
                   
'query' => "SELECT * FROM `category` WHERE __WHERE__",
                   
'__WHERE__' => [
                       
'is_deleted' => ['custom', 'No'],
                       
'parent_id' => ['hierarchyData', 'return:sub:id'],
                    ],
                   
'mode' => 'multipleRowFormat',//Multiple rows returned.
                   
'subQuery' => [
                       
'subsubsub' => [
                           
'query' => "SELECT * FROM `category` WHERE __WHERE__",
                           
'__WHERE__' => [
                               
'is_deleted' => ['custom', 'No'],
                               
'parent_id' => ['hierarchyData', 'return:sub:subsub:id'],//data:address:id
                           
],
                           
'mode' => 'multipleRowFormat',//Multiple rows returned.
                       
]
                    ]
                ]
            ],
        ]
    ],
   
'useHierarchy' => true,
   
'fetchFrom' => 'Master',
];