PHP Classes

File: Config/Queries/Auth/GlobalDB/GET/groups.php

Recommend this page to a friend!
  Classes of Ramesh Narayan Jangid (Sharma)   Open Swoole Microservices   Config/Queries/Auth/GlobalDB/GET/groups.php   Download  
File: Config/Queries/Auth/GlobalDB/GET/groups.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Open Swoole Microservices
Implement microservices using Open Swoole
Author: By
Last change:
Date: 6 days ago
Size: 1,278 bytes
 

Contents

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

use
Microservices\App\Constants;
use
Microservices\App\DatabaseDataTypes;
use
Microservices\App\Env;

return [
   
'all' => [
       
'__QUERY__' => "SELECT * FROM `{$Env::$groups}` WHERE __WHERE__ ORDER BY group_id ASC",
       
'__WHERE__' => [
            [
'column' => 'is_approved', 'fetchFrom' => 'custom', 'fetchFromValue' => 'Yes'],
            [
'column' => 'is_disabled', 'fetchFrom' => 'custom', 'fetchFromValue' => 'No'],
            [
'column' => 'is_deleted', 'fetchFrom' => 'custom', 'fetchFromValue' => 'No'],
        ],
       
'__MODE__' => 'multipleRowFormat'
   
],
   
'single' => [
       
'__QUERY__' => "SELECT * FROM `{$Env::$groups}` WHERE __WHERE__",
       
'__WHERE__' => [
            [
'column' => 'is_approved', 'fetchFrom' => 'custom', 'fetchFromValue' => 'Yes'],
            [
'column' => 'is_disabled', 'fetchFrom' => 'custom', 'fetchFromValue' => 'No'],
            [
'column' => 'is_deleted', 'fetchFrom' => 'custom', 'fetchFromValue' => 'No'],
            [
'column' => 'group_id', 'fetchFrom' => 'uriParams', 'fetchFromValue' => 'group_id'],
        ],
       
'__MODE__' => 'singleRowFormat'
   
]
][isset(
$this->c->httpRequest->session['uriParams']['group_id'])?'single':'all'];