Developments

MySQL Stored Procedure for CRUD Dynamic Queries

Posted on

The new MySQL 5.7 version has some great features. One of them is the ‘JSON data’ type. We can use it for column of table like ‘Virtual Colunm’ with Indexing. But, ‘JSON data’ is also useful for stored procedure. Because we can compact parameters and the procedure could be more flexible.I made the procedures for […]

Developments

Using request of JSON Payload in Slim framework

Posted on
Slim Framework

How to enable JSON-Payload input in Slim Framework… SlimMiddlewareContentTypes.php <?php /** * Middleware SlimMiddlewareContentTypes (for JSON Payload requests) * 2015/03/12 * Aiden Kim */ class SlimMiddlewareContentTypes extends \Slim\Middleware\ContentTypes { public function call() { $mediaType = $this->app->request->getMediaType(); if ( isset($this->contentTypes[$mediaType]) && !$this->app->request->isGet() && !$this->app->request->isHead() ) { $env = $this->app->environment(); // Parse request data $form_hash = $this->parse($env[‘slim.input’], […]

Developments

MSSQL table to json procedure

Posted on

Return json string from table data. — Author: Matthew D. Erwin (Snaptech, LLC) — Create date: May 9, 2013   — Modify: Aiden Kim, May 30, 2014 /****** Object: StoredProcedure [dbo].[sp_table2json] Script Date: 07/07/2014 14:11:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO — — Author: Matthew D. Erwin (Snaptech, LLC) — Create date: May 9, […]