PHP Classes

File: Config/Queries/Auth/GlobalDB/POST/clients.php

Recommend this page to a friend!
  Classes of Ramesh Narayan Jangid (Sharma)   PHP Microservices Framework   Config/Queries/Auth/GlobalDB/POST/clients.php   Download  
File: Config/Queries/Auth/GlobalDB/POST/clients.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: PHP Microservices Framework
Setup microservices apps with configuration arrays
Author: By
Last change: Support for same col multiple time
Adding double underscore for fields that can be used in __SUB-QUERY__
Adding double underscore for fields that can be used in __SUB-QUERY__
Date: 12 days ago
Size: 945 bytes
 

Contents

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

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

return [
   
'__QUERY__' => "INSERT INTO `{$Env::$clients}` SET __SET__",
   
'__SET__' => [
        [
'column' => 'name', 'fetchFrom' => 'payload', 'fetchFromValue' => 'name'],
        [
'column' => 'comments', 'fetchFrom' => 'payload', 'fetchFromValue' => 'comments'],
        [
'column' => 'created_by', 'fetchFrom' => 'userDetails', 'fetchFromValue' => 'user_id'],
        [
'column' => 'created_on', 'fetchFrom' => 'custom', 'fetchFromValue' => date('Y-m-d H:i:s')],
        [
'column' => 'is_approved', 'fetchFrom' => 'custom', 'fetchFromValue' => 'No'],
        [
'column' => 'is_disabled', 'fetchFrom' => 'custom', 'fetchFromValue' => 'No'],
        [
'column' => 'is_deleted', 'fetchFrom' => 'custom', 'fetchFromValue' => 'No']
    ],
   
'__INSERT-IDs__' => 'client_id',
];