2017 © Pedro Peláez
 

cakephp-plugin mysql_collate

Mysql Datasource For CakePHP supporting COLLATE in conditions

image

sadapon2008/mysql_collate

Mysql Datasource For CakePHP supporting COLLATE in conditions

  • Thursday, January 26, 2017
  • by sadapon2008
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

MysqlCollate

Mysql datasource for CakePHP 2.x supporting COLLATE in conditions., (*1)

Example

1. change datasource in database.php

public $default = array(
    'datasource' => 'MysqlCollate.Database/MysqlCollate',
    'persistent' => false,
    'host' => 'localhost',
    'port' => '',
    'login' => 'cakeBlog',
    'password' => 'c4k3-rUl3Z',
    'database' => 'cake_blog_tutorial',
    'schema' => '',
    'prefix' => '',
    'encoding' => 'utf8'
);

2. load MysqlCollateBehavior before Model::find()

$options = array(
    'condition' = array(
        'Post.title LIKE' => 'aBcD',
    ),
    'order' => array(
        'Post.id' => 'ASC',
    ),
);

$this->Post->Behaviors->load(
    'MysqlCollate.MysqlCollate',
    array(
      'Post.title' => 'utf8_unicode_ci',
    )
);

$result = $this->Post->find('all', $options);

$this->Post->Behaviors->unload('MysqlCollate');

The Versions

26/01 2017

dev-master

9999999-dev https://github.com/sadapon2008/mysql_collate

Mysql Datasource For CakePHP supporting COLLATE in conditions

  Sources   Download

MIT

The Requires

 

cakephp

20/02 2015

0.2

0.2.0.0 https://github.com/sadapon2008/mysql_collate

Mysql Datasource For CakePHP supporting COLLATE in conditions

  Sources   Download

The Requires

 

cakephp

20/02 2015

0.1

0.1.0.0 https://github.com/sadapon2008/mysql_collate

Mysql Datasource For CakePHP supporting COLLATE in conditions

  Sources   Download

The Requires

 

cakephp